Splunk Search

Splunk query for Forwarder , Indexer & SH restart

alexspunkshell
Contributor

Could someone please help me with the Splunk query to configure the alert if Forwarder, Indexer, or search head had restart?

@scelikok @soutamo @saravanan90 @thambisetty @ITWhisperer @gcusello @bowesmana   @to4kawa 

Labels (2)
0 Karma
1 Solution

isoutamo
SplunkTrust
SplunkTrust

Hi

Here is one way, maybe not the best one.

(index=_internal source=*splunkd.log (host=<YOUR SPLUNK NODES>) ((component=CMServiceThread "CMNotifyThread starting eloop") OR (component=ServerConfig "My GUID") OR (component=loader ("All pipelines finished." OR "Shutdown HTTPDispatchThread")) OR (component=ShutdownHandler "Shutting down splunkd"))) 
| transaction startswith="Shutting down splunkd" endswith="CMNotifyThread starting eloop" keeporphans=true keepevicted=true maxspan=10m
| sort host 
| streamstats reset_on_change=t sum(duration) as total_duration by host
| table _time, duration, total_duration, host, _raw
| eval duration=tostring(duration, "duration"), total_duration=tostring(total_duration, "duration")
| sort - _time

r. Ismo 

View solution in original post

isoutamo
SplunkTrust
SplunkTrust

Hi

Here is one way, maybe not the best one.

(index=_internal source=*splunkd.log (host=<YOUR SPLUNK NODES>) ((component=CMServiceThread "CMNotifyThread starting eloop") OR (component=ServerConfig "My GUID") OR (component=loader ("All pipelines finished." OR "Shutdown HTTPDispatchThread")) OR (component=ShutdownHandler "Shutting down splunkd"))) 
| transaction startswith="Shutting down splunkd" endswith="CMNotifyThread starting eloop" keeporphans=true keepevicted=true maxspan=10m
| sort host 
| streamstats reset_on_change=t sum(duration) as total_duration by host
| table _time, duration, total_duration, host, _raw
| eval duration=tostring(duration, "duration"), total_duration=tostring(total_duration, "duration")
| sort - _time

r. Ismo 

Get Updates on the Splunk Community!

Detecting Remote Code Executions With the Splunk Threat Research Team

REGISTER NOWRemote code execution (RCE) vulnerabilities pose a significant risk to organizations. If ...

Observability | Use Synthetic Monitoring for Website Metadata Verification

If you are on Splunk Observability Cloud, you may already have Synthetic Monitoringin your observability ...

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...