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 Observability for AI

Don’t miss out on an exciting Tech Talk on Splunk Observability for AI! Discover how Splunk’s agentic AI ...

[Puzzles] Solve, Learn, Repeat: Dereferencing XML to Fixed-length events

This challenge was first posted on Slack #puzzles channelFor a previous puzzle, I needed a set of fixed-length ...

Stay Connected: Your Guide to December Tech Talks, Office Hours, and Webinars!

What are Community Office Hours? Community Office Hours is an interactive 60-minute Zoom series where ...