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
Register for .conf21 Now! Go Vegas or Go Virtual!

How will you .conf21? You decide! Go in-person in Las Vegas, 10/18-10/21, or go online with .conf21 Virtual, 10/19-10/20.