Splunk Search

To check if service of endpoint starts back once stopped

DawoodKhanUlex
Engager

Hi Folks,

 

I am working on creating an alert for endpoint where we have to check if its service came up after it got stop during upgrade.

For eg: - Host A service stop and didnt came up for 3 days then an alert will be triggered.

Also we can compare on basis of filedname state=Stopped and state=Running, but host should be same

Please let me know if there is any way we can create alert for this scenario

Thanks,

Labels (1)
0 Karma

diogofgm
SplunkTrust
SplunkTrust

Have you tried something like this?

<your base search>
| stats last(state) AS state last(_time) AS _time by host service
| eval time_diff = now() - _time
| where (state="Stopped" AND time_diff > 259200)

 

 

------------
Hope I was able to help you. If so, some karma would be appreciated.
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

What Is Splunk? Here’s What You Can Do with Splunk

Hey Splunk Community, we know you know Splunk. You likely leverage its unparalleled ability to ingest, index, ...

Level Up Your .conf25: Splunk Arcade Comes to Boston

With .conf25 right around the corner in Boston, there’s a lot to look forward to — inspiring keynotes, ...

Manual Instrumentation with Splunk Observability Cloud: How to Instrument Frontend ...

Although it might seem daunting, as we’ve seen in this series, manual instrumentation can be straightforward ...