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 (1)
0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Splunk AI Assistant for SPL vs. ChatGPT: Which One is Better?

In the age of AI, every tool promises to make our lives easier. From summarizing content to writing code, ...

Data Persistence in the OpenTelemetry Collector

This blog post is part of an ongoing series on OpenTelemetry. What happens if the OpenTelemetry collector ...

Thanks for the Memories! Splunk University, .conf25, and our Community

Thank you to everyone in the Splunk Community who joined us for .conf25, which kicked off with our iconic ...