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!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...