Alerting

Email Alert Setup if Splunk is down in Production

nikhilagrawal
Path Finder

Anybody can suggest how to setup email alerts if Splunk service is down. I am trying to configure alerts in a way so we get email alert if service is down.

Any sort of help will be appreciated.

Thanks
Nik

Tags (2)
0 Karma

yannK
Splunk Employee
Splunk Employee

Who will watch the watchmen.

You may want to use a third party script or tool to check that the splunkd process is up and running

  • a simple /opt/splunk/bin/splunk status should do the trick

  • or a search on last 5 minutes
    /opt/splunk/bin/splunk search "earliest=-5m index=* | stats count | eval status=if(count>0,'OK','ERROR')" -auth user:password

  • or a separate search-head, checking the number of events.

yannK
Splunk Employee
Splunk Employee

those have to used in a script that will check the result

  • this status command will show you if splunk is running
  • and the search will show you is events from the last 5 minutes are searchable.

If you want to check if the process is running, then you need a ps script or a monitor. please contact your system administrator, this is his job.

Dark_Ichigo
Builder

What does this: /opt/splunk/bin/splunk search "earliest=-5m index=* | stats count | eval status=if(count>0,'OK','ERROR')" -auth user:password

Do? and if I turn this into a script that checks for it, will this do the trick?

0 Karma
Get Updates on the Splunk Community!

New Year. New Skills. New Course Releases from Splunk Education

A new year often inspires reflection—and reinvention. Whether your goals include strengthening your security ...

Splunk and TLS: It doesn't have to be too hard

Overview Creating a TLS cert for Splunk usage is pretty much standard openssl.  To make life better, use an ...

Faster Insights with AI, Streamlined Cloud-Native Operations, and More New Lantern ...

Splunk Lantern is a Splunk customer success center that provides practical guidance from Splunk experts on key ...