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!

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!

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

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...