SPLK-1005 practice question 4 of 10

Which of the following is not a path used by Splunk to execute scripts?

Full set: 80 questions

Domain Splunk Content for Security Monitoring

Answer options
A: SPLUNK_HOME/etc/system/bin
B: SPLUNK HOME/etc/appa//bin
C: SPLUNKHOMS/ctc/scripts/local Correct answer
D: SPLUNK_HOME/bin/scripts
Correct Answer:
C. SPLUNKHOMS/ctc/scripts/local
Explanation

Splunk Enterprise is configured to execute scripts from specific, predefined directories to ensure security and proper functionality. The two primary, officially documented locations are $SPLUNKHOME/bin/scripts for global scripts and $SPLUNKHOME/etc/apps//bin for application-specific scripts. These paths are used for functionalities like scripted inputs, alert actions, and custom search commands. The path SPLUNKHOME/etc/scripts/local is not a standard directory that Splunk monitors for executable scripts. The etc directory is reserved for configuration files, lookups, and application structures, and does not natively contain a scripts subdirectory for execution purposes.

Why Incorrect

A. SPLUNKHOME/etc/system/bin This is not a standard location for user-defined scripts like scripted inputs or alerts. Splunk does not look in this directory by default for script execution.
B. SPLUNKHOME/etc/apps//bin This is a correct and standard path. It is the designated location for scripts that are part of a specific Splunk application or add-on.
D. SPLUNKHOME/bin/scripts This is a correct and standard path. It serves as the global directory for scripts that are not associated with any particular application.

References

1. Splunk Enterprise Documentation, Admin Manual, "Create a scripted input in Splunk Web".

Reference: In the "Prerequisites" section, the documentation explicitly states: "Place your script in an appropriate directory. Scripts can be located in $SPLUNKHOME/etc/apps//bin or $SPLUNKHOME/bin/scripts." This confirms that options B and D are valid paths, and by omission, that other paths are not standard.

2. Splunk Enterprise Documentation, Alerting Manual, "Set up a script for an alert action".

Reference: Under the "Create a script" section, step 1 directs the user: "Save the script file to either $SPLUNKHOME/bin/scripts or $SPLUNKHOME/etc/apps//bin." This further validates that B and D are the correct locations for alert action scripts.

3. Splunk Enterprise Documentation, Search Manual, "Make your script available to Splunk Search".

Reference: This section on creating custom search commands specifies: "The script must be in $SPLUNKHOME/etc/apps//bin." This confirms option B is a valid path for this specific script type.

Scroll to Top