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!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...