What will the following inputs.conf stanza do?
[script://myscript.sh]
interval=0
What will the following inputs.conf stanza do?
[script://myscript.sh]
interval=0
Setting 'interval=0' in the inputs.conf stanza for a scripted input instructs Splunk to run the script continuously. This means that as soon as the script exits, Splunk will restart it immediately, creating a loop of continuous execution.
C. See scripted input: https://docs.splunk.com/Documentation/Splunk/9.2.1/Admin/Inputsconf [script://<cmd>] interval = [<decimal>|<cron schedule>] * The special value "0" forces this scripted input to be run continuously. As soon as the script exits, the input restarts it. * The special value "-1" causes the scripted input to run once on start-up. * NOTE: when you specify a cron schedule, the input does not run the script on start-up. * Default: 60.0
Should be B. By setting 'interval=0', you're instructing Splunk to execute the script a single time at the startup of the Splunk service. After the initial execution, Splunk will not run the script again unless the service is restarted.