SPLK-3003 practice question 10 of 15

A [script://] input sends data to a Splunk forwarder using which method?

Full set: 85 questions
Answer options
A: UDP stream
B: TCP stream
C: Temporary file
D: STDOUT/STDERR Correct answer
Correct Answer:
D. STDOUT/STDERR
Explanation

The script:// input type in Splunk is designed to execute a specified script or command at a defined interval. The Splunk software then captures any data that the script writes to its standard output (STDOUT) or standard error (STDERR) streams. This captured output is treated as event data, which is then parsed and forwarded through the Splunk data pipeline for indexing. This mechanism allows Splunk to ingest data from sources that are not file-based, such as APIs or command-line tools, by wrapping them in a script.

Why Incorrect

A. UDP stream: This refers to a [udp://] input stanza. A script could send data to a UDP port, but this is not how the [script://] input itself functions.
B. TCP stream: This refers to a [tcp://] input stanza. While a script could be written to send data over TCP, the [script://] input captures console output directly.
C. Temporary file: This describes a process where a script writes to a file that is then monitored by a [monitor://] input, which is a different and separate input method.

References

1. Splunk Enterprise Documentation, Getting Data In, "Get data from APIs and other remote data interfaces through scripted inputs". In the section "How scripted inputs work," it states, "Splunk Enterprise runs the specified script and indexes the data that the script prints to the standard output (STDOUT) or standard error (STDERR) streams."

2. Splunk Enterprise Documentation, inputs.conf Specification. The documentation for the [script://] stanza details that the Splunk platform executes the command specified in the path and captures its output from STDOUT for indexing.

Scroll to Top