As you may already know, on *nix systems the start-up of Splunk during system boot is normally controlled by the /etc/init.d/splunk script. Looking at the "start" procedure in that script, we use "--no-prompt" as the default start-up option :
splunk_start() {
echo Starting Splunk...
"/home/support/sas/bin/splunk" start --no-prompt
RETVAL=$?
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/splunk
}
This is in concordance with the behavior reported here when considering the definition of the "--no-prompt" option - http://www.splunk.com/base/Documentation/latest/Installation/StartSplunkforthefirsttime#Other_start_options :
There are two other start options: no-prompt and answer-yes:
* If you run $SPLUNK_HOME/bin/splunk start --no-prompt, Splunk proceeds with startup until it requires you to answer a question. Then, it displays the question, why it is quitting, and quits.
* If you run SPLUNK_HOME/bin/splunk start --answer-yes, Splunk proceeds with startup and automatically answers "yes" to all yes/no questions. Splunk displays the question and answer as it continues.
You could add "--answer-yes" after "--no-prompt" in the start procedure of /etc/init.d/splunk which would result in the following behavior on start-up :
Splunk answers "yes" to any "yes/no" question.
Splunk quits when it encounters a non-"yes/no" question.
Now keep in mind that this is a change that you would have to make at your own risk. It might be preferable for the Splunk admin to be clearly aware of the existence of index consistency issues. But if you would like to change the behavior of /etc/init.d/splunk in the way we just discussed, that's how you can do it.
IMPORTANT UPDATE : As of Splunk 4.2.3, this prompt no longer occurs and the user is notified instead upon restart after an unclean shutdown that a manual check of the indexes might be a good idea :
Splunk has detected an unclean shutdown. The database should be checked in
order to ensure correct search results, but this may take a very long time,
depending on your system.
If you would like to check/repair the database, stop Splunk and run:
splunk fsck --all --repair
... View more