SPLK-1003 Exam QuestionsBrowse all questions from this exam

SPLK-1003 Exam - Question 144


What will the following inputs.conf stanza do?

[script://myscript.sh]

interval=0

Show Answer
Correct Answer: C

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.

Discussion

2 comments
Sign in to comment
shesky17Option: C
May 11, 2024

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

Frank_RaiOption: B
Apr 9, 2024

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.