Splunk Search

Single Query to alert when a process is down and alert when it is up on a linux server

sarves
Loves-to-Learn Everything

Hi All,

I am trying to write simple & single query to alert when a process is down and alert again when the same process is up. However, it seems there is no straightforward way.
used below query to get alert when process is down and it is working  perfectly.
| mstats latest(_value) as RSS_Memory WHERE index=telegraf metric_name=procstat.memory_rss host=<hostname> process_name=<processname> by process_name pid

However, I am seeking help in writing single query alert when a process is down and alert again when the same process is up.  Please help, struggling from many days on this.

--
Thanks
Sarves

Labels (2)
0 Karma
Get Updates on the Splunk Community!

Get Inspired! We’ve Got Validation that Your Hard Work is Paying Off

We love our Splunk Community and want you to feel inspired by all your hard work! Eric Fusilero, our VP of ...

What's New in Splunk Enterprise 9.4: Features to Power Your Digital Resilience

Hey Splunky People! We are excited to share the latest updates in Splunk Enterprise 9.4. In this release we ...

Take Your Breath Away with Splunk Risk-Based Alerting (RBA)

WATCH NOW!The Splunk Guide to Risk-Based Alerting is here to empower your SOC like never before. Join Haylee ...