Splunk Search

How can you check if the splunkweb and splunkd process are running?

jeffoptimizely
Explorer

Is there a good Unixy way to check "is splunkweb running" and "is splunkd running"? I want to run a cronjob that checks if they are running and, if not, runs splunk restart automatically.

Tags (3)

jeffoptimizely
Explorer

I didn't think it posted the first time, since I wasn't logged in. Feel free to delete one.

Thanks, I didn't know about the PID files. I will likely use those.

0 Karma

joshd
Builder

yeah I've noticed that behavior as well.. I'll open a case with Splunk and hopefully they can troubleshoot.

0 Karma

jeffoptimizely
Explorer

Seriously, there's something wrong with the user interface of Splunk Base. It just happened to me again.

When you answer a question but aren't logged in, you do the following:
1. Answer question
2. Log in
3. The website takes you back to where you were before, but doesn't notify you that your question or answer was posted. Therefore, you think you have to do it again.

0 Karma

joshd
Builder

Asking the question twice isn't always the best practice...

Same answer as I put in your other post:

Do you want to check if it's running or responsive? Those are two different things...

If it's running just write a quick script to grab the PIDs from $SPLUNK_HOME/var/run/splunk/splunkd.pid and make sure there's two instances running or if there's no file then that also means its down.

May also wish to include in your script a simple wget call to make sure the login page is returned, just to verify it's responding to requests while it's running.

Get Updates on the Splunk Community!

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...