SPLK-1003 practice question 10 of 25

In inputs. conf, which stanza would mean Splunk was only reading one local file?

Full set: 188 questions
Answer options
A: [read://opt/log/crashlog/Jan27crash.txt]
B: [monitor::/ opt/log/crashlog/Jan27crash.txt]
C: [monitor:/// opt/log/]
D: [monitor:/// opt/log/ crashlog/Jan27crash.txt] Correct answer
Correct Answer:
D. [monitor:/// opt/log/ crashlog/Jan27crash.txt]
Explanation

The [monitor:///path/to/file] stanza in inputs.conf configures a Splunk forwarder or instance to continuously monitor a single file for new data. The triple slash (///) indicates an absolute path on the local host. This syntax specifically targets one file, Jan27crash.txt, for data input, fulfilling the requirement of reading only one local file. While option B is also syntactically valid (monitor:: is an alternative to monitor:///), option D represents the more common and canonical syntax for this purpose.

Why Incorrect

A. [read://...]: This is not a valid stanza type for data inputs in Splunk's inputs.conf file.
B. [monitor::/...]: While syntactically valid and functionally identical to option D, it is a less common notation for Unix/Linux absolute paths. Option D is the standard representation.
C. [monitor:///opt/log/]: This stanza monitors an entire directory, opt/log/, and all the files within it, not just a single file.

References

Splunk Enterprise Documentation, Getting Data In, "Monitor files and directories with inputs.conf". This section details the monitor stanza syntax, showing [monitor:///] as the standard for monitoring specific files or directories. It clarifies that /// specifies a local, absolute path.

Splunk Enterprise Documentation, Admin Manual, "inputs.conf". The specification for inputs.conf confirms that [monitor://] is the correct stanza and that [monitor::] is a valid alternative to [monitor:///].

Scroll to Top