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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...