Splunk Search

Generating alert based on condition

Ashutosh_30
Loves-to-Learn

Hi All ,

i have configured alerts for the search below:

index="ebs_red_0" host="dev-obiee-ux0*" source="/obiee_12c/app/oracle/product/12212/user_projects/domains/bi/nodemanager/nodemanager.log" "waiting for the process to die"

Output :

8/3/21
9:38:11.000 AM
dev-obiee-ux08The server 'obips2' with process id 12714242 is no longer alive; waiting for the process to die.obips2obiee:nodemanager:logAug 3, 2021 5:38:11 AM EDT

 

but sometimes when my server process dies it restarts automatically within a 60 seconds which can be described as :

index="ebs_red_0" host="dev-obiee-ux0*" source="/obiee_12c/app/oracle/product/12212/user_projects/domains/bi/nodemanager/nodemanager.log" "is running now"

Output : 

8/3/21
9:39:27.000 AM
dev-obiee-ux08The server 'obis2' is running now.obis2obiee:nodemanager:logAug 3, 2021 5:39:27 AM EDT

 

So i want to write the search query in a way so that i generate alert only if the server process dies and doesn't come up again within 120 seconds.


the five fields used in the search are :

_time, host ,Message ,OBIEE_Comp, sourcetype ,time

 

and to generate the alert the OBIEE_Comp needs to be same 


Labels (1)
0 Karma

Ashutosh_30
Loves-to-Learn

This works but the problem is i'm getting all the results in single row.
for this :
index="ebs_red_0" host="dev-obiee-ux0*" source="/obiee_12c/app/oracle/product/12212/user_projects/domains/bi/nodemanager/nodemanager.log" "Server was killed" OR "waiting for the process to die"
| stats earliest(_time) as _time,values(time) as time,values(host) as host, values(Message) as Message, values(OBIEE_Comp) as OBIEE_Comp , values(sourcetype) as sourcetype, range(_time) as time_gap | where time_gap > 120 | table time, host ,Message ,OBIEE_Comp, sourcetype ,time_gap

Ashutosh_30_0-1628668603893.png


i want to get every record in a separate row




0 Karma

venkatasri
SplunkTrust
SplunkTrust

Hi @Ashutosh_30 

Try this and schedule it for every 5 mins,

index="ebs_red_0" host="dev-obiee-ux0*" source="/obiee_12c/app/oracle/product/12212/user_projects/domains/bi/nodemanager/nodemanager.log" "waiting for the process to die" OR "is running now"
| stats earliest(_time) as time, values(Message) as message, values(OBIEE_Comp) as OBIEE_Comp , values(sourcetype) as sourcetype, range(_time) as time_gap
| where time_gap > 120
| table _time, host ,Message ,OBIEE_Comp, sourcetype ,time_gap

 

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

[Puzzles] Solve, Learn, Repeat: Tiling

This puzzle (first published here) is based on finding groups of tessellated tiles (inspired by floor tiles I ...

SOK it to Me: Top 3 Benefits of Using Splunk Operator on Kubernetes that’ll Make ...

    Thursday, July 9, 2026  |  11:00AM–12:00PM PDT Duration: 1 hour (includes Q&A) Managing can feel like a ...

Upgrade Prep for 10.4, Network Observability Deep Dives, and More from Splunk Lantern

Splunk Lantern is Splunk’s customer success center that provides practical guidance from Splunk experts on key ...