Splunk Search

How to seperate succefully login attempt from invlaid Login id

jaibalaraman
Path Finder

Hi Team

Can anyone help me with Splunk search query to split the successful login from invalid? 

Ex - I want to exclude OK from the search, want to see only the locket out, invalid, invalid parameter

jaibalaraman_0-1712097718453.png

 

Thanks 

 

 

Labels (2)
Tags (1)
0 Karma

jaibalaraman
Path Finder

 

 

I tried,, but the search returning no result. 

 

jaibalaraman_1-1712100663756.png

 

 

 

0 Karma

bowesmana
SplunkTrust
SplunkTrust

Whenever you use a field name in an 'eval' expression (where requires an eval expression), you need to use single quotes around the field name if the field name is on the right hand side of the eval statement and contains non-simple characters (in this case the full stop), so 

| where 'event.Properties.errMessage' != "OK"

Note the sometimes confusing use of single and double quotes used, for example this statement

| eval event.Properties.errMessage="Hello"

does NOT need quotes on the left hand side of the statement.

Where necessary, the left hand side use of quotes requires double quotes, so if your field name has a space, you would need

| eval "My Field With Spaces"="Hello"

 

0 Karma

bowesmana
SplunkTrust
SplunkTrust

Or based on your other question, you can directly set that criteria in the initial search, i.e.

index=test event.Properties.errMessage!=OK
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust
| where event.Properties.errMessage != "OK"
0 Karma

jaibalaraman
Path Finder

Hi 

How do i seperate multiple error instead " OK "

Invalid password, reset password, permission denied etc

 

index=events event.Properties.errMessage != "Invalid LoginID","Account Temporarily Locked Out","Permission denied""Unauthorized user","Account Pending Verification","Invalid parameter value"
| stats count by event.Properties.errMessage

jaibalaraman_0-1712200150562.png

 

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Try something like this

index=events event.Properties.errMessage!="Invalid LoginID" event.Properties.errMessage!="Account Temporarily Locked Out" event.Properties.errMessage!="Permission denied" event.Properties.errMessage!="Unauthorized user" event.Properties.errMessage!="Account Pending Verification" event.Properties.errMessage!="Invalid parameter value"
| stats count by event.Properties.errMessage
0 Karma
Get Updates on the Splunk Community!

UCC Framework: Discover Developer Toolkit for Building Technology Add-ons

The Next-Gen Toolkit for Splunk Technology Add-on Development The Universal Configuration Console (UCC) ...

.conf25 Community Recap

Hello Splunkers, And just like that, .conf25 is in the books! What an incredible few days — full of learning, ...

Splunk App Developers | .conf25 Recap & What’s Next

If you stopped by the Builder Bar at .conf25 this year, thank you! The retro tech beer garden vibes were ...