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!

Cultivate Your Career Growth with Fresh Splunk Training

Growth doesn’t just happen—it’s nurtured. Like tending a garden, developing your Splunk skills takes the right ...

Introducing a Smarter Way to Discover Apps on Splunkbase

We’re excited to announce the launch of a foundational enhancement to Splunkbase: App Tiering.  Because we’ve ...

How to Send Splunk Observability Alerts to Webex teams in Minutes

As a Developer Evangelist at Splunk, my team and I are constantly tinkering with technology to explore its ...