SPLK-1003 Exam QuestionsBrowse all questions from this exam

SPLK-1003 Exam - Question 145


Which file will be matched for the following monitor stanza in inputs.conf?

[monitor:///var/log/*/bar/.../*.txt]

Show Answer
Correct Answer: AD

The monitor stanza [monitor:///var/log/*/bar/.../*.txt] specifies paths where files should be monitored, using wildcards and recursive directory matching. The first wildcard (*) matches any single path segment directly under /var/log. The next part, 'bar', specifies that the matched directories should contain a directory named 'bar'. The '...' indicates that any number of subdirectories might follow. Finally, the '*.txt' specifies that the matched files must end with a '.txt' extension. Option A (/var/log/host_469386086/bar/file/foo.txt) meets all these criteria: 'host_469386086' matches the first wildcard, 'bar' matches the actual directory, and the subdirectories and '.txt' file extension match the '...' and '*.txt' respectively.

Discussion

5 comments
Sign in to comment
shesky17Option: A
May 11, 2024

A. /var/log/host_469386086/bar/file/foo.txt https://docs.splunk.com/Documentation/Splunk/9.2.1/Admin/Inputsconf "..." searches recursively through one or more directories. This means that /foo/.../bar matches foo/1/bar, foo/1/2/bar, etc. The asterisk (*) matches anything in a single path segment; unlike "...", it does not search recursively. For example, /foo/*/bar matches the files /foo/1/bar, /foo/2/bar, etc. However, it does not match /foo/bar or /foo/1/2/bar.

Frank_RaiOption: A
Apr 9, 2024

"A" looks good.

Frank_RaiOption: B
Apr 9, 2024

Changed to ‘B’ The correct file that will be matched for the given monitor stanza [monitor:///var/log/*/bar/.../*.txt] is: B. /var/log/host_469336086/bar/foo.txt Explanation: The wildcard * matches any string, and the ... allows for any directories to be included in the path. However, the path must end in .txt due to the /*.txt specification. Option B fits this pattern as it directly falls under a bar directory and ends with .txt.

not_another_user_007Option: B
May 10, 2024

The answer is B

62d8e4cOption: A
May 24, 2024

"..." searches recursively through one or more directories.