Splunk Search

Splunk alert base on return code

LolabhattuA
Loves-to-Learn

My file contains a line at the last where it mentions the return code. The format look like below mentioned. If the job fails, It returns 32 and if the job is successful it returns 0.

Main -> ** Execution completed with returnCode: 0,

Can some one help me in building a splunk query to alert me if the code is 32 or 0.

 

Labels (1)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Start by building a report with the data you want in the alert

Have you already ingested the file as a series of events?

Which fields have you already extracted from the events?

Is there more than one job in the file you are monitoring?

0 Karma

LolabhattuA
Loves-to-Learn

Yes, The file is already ingested into the Splunk,

Only one esp job is being listed in the file.

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Can you share some of the events using a code block </>

0 Karma

SinghK
Builder

|inputlookup (your lookup)| search (returncode= 32 OR returncode=0) 

0 Karma
Get Updates on the Splunk Community!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

Splunk is officially part of Cisco

Revolutionizing how our customers build resilience across their entire digital footprint.   Splunk ...

Splunk APM & RUM | Planned Maintenance March 26 - March 28, 2024

There will be planned maintenance for Splunk APM and RUM between March 26, 2024 and March 28, 2024 as ...