New Year Sale ! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Splunk Exam SPLK-1003 Topic 5 Question 106 Discussion

Actual exam question for Splunk's SPLK-1003 exam
Question #: 106
Topic #: 5
[All SPLK-1003 Questions]

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

Show Suggested Answer Hide Answer
Suggested Answer: C

The correct answer is C. /var/log/host_460352847/bar/file/foo.txt.

The monitor stanza in inputs.conf is used to configure Splunk to monitor files and directories for new data. The monitor stanza has the following syntax1:

[monitor://<input path>]

The input path can be a file or a directory, and it can include wildcards (*) and regular expressions. The wildcards match any number of characters, including none, while the regular expressions match patterns of characters. The input path is case-sensitive and must be enclosed in double quotes if it contains spaces1.

In this case, the input path is /var/log//bar/.txt, which means Splunk will monitor any file with the .txt extension that is located in a subdirectory named bar under the /var/log directory. The subdirectory bar can be at any level under the /var/log directory, and the * wildcard will match any characters before or after the bar and .txt parts1.

Therefore, the file /var/log/host_460352847/bar/file/foo.txt will be matched by the monitor stanza, as it meets the criteria. The other files will not be matched, because:

A) /var/log/host_460352847/temp/bar/file/csv/foo.txt has a .csv extension, not a .txt extension.

B) /var/log/host_460352847/bar/foo.txt is not located in a subdirectory under the bar directory, but directly in the bar directory.

D) /var/log/host_460352847/temp/bar/file/foo.txt is located in a subdirectory named file under the bar directory, not directly in the bar directory.


Contribute your Thoughts:

Lonny
5 days ago
Haha, this question is a real brain-teaser! I'm going to guess B, just because it's the longest and most complicated-looking option. That's usually a good strategy, right?
upvoted 0 times
...
Ashlee
6 days ago
I disagree, I believe the correct answer is D) /var/log/host_460352847/bar/file/foo.txt
upvoted 0 times
...
Major
15 days ago
Hmm, this is tricky. I'm going to go with E. It looks like the stanza is looking for a file in the '/var/log/host_460352847/temp/bar/file/' directory, and 'foo.txt' is the only one that fits.
upvoted 0 times
...
Quentin
17 days ago
I'm pretty sure it's D. The monitor stanza looks for a file in the '/var/log/host_460352847/bar/file/' directory, and 'foo.txt' is the only one that matches.
upvoted 0 times
...
Shaun
18 days ago
The answer is C. The monitor stanza in inputs.conf uses a wildcard pattern to match files in the '/var/log/host_460352847/bar/' directory, and 'foo.txt' is the only file that fits this pattern.
upvoted 0 times
Sharita
5 days ago
I think the answer is A.
upvoted 0 times
...
...
Hermila
22 days ago
I think the answer is B) /var/log/host_460352847/temp/bar/file/csv/foo.txt
upvoted 0 times
...

Save Cancel