Splunk Search

Need Help with Splunk Alert

Amit79
Loves-to-Learn Everything

I need help with below splunk query

 

index=XXX_XXX_XXX
| eval job_status=if( 'MSGTXT' = "*ABEND*","ko","ok")
| where job_status="ko"

 

If I change job_status="ok" its working but not for above condition, appreciate any suggestion on this.

 

Regards

 

Tags (1)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

Try using the match function to test the field value.

index=XXX_XXX_XXX
| eval job_status=if(match('MSGTXT', "ABEND"),"ko","ok")
| where job_status="ko"

 

---
If this reply helps you, Karma would be appreciated.
Get Updates on the Splunk Community!

Splunk Mobile: Your Brand-New Home Screen

Meet Your New Mobile Hub  Hello Splunk Community!  Staying connected to your data—no matter where you are—is ...

Introducing Value Insights (Beta): Understand the Business Impact your organization ...

Real progress on your strategic priorities starts with knowing the business outcomes your teams are delivering ...

Enterprise Security (ES) Essentials 8.3 is Now GA — Smarter Detections, Faster ...

As of today, Enterprise Security (ES) Essentials 8.3 is now generally available, helping SOC teams simplify ...