Cyber Monday 2024! 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:

Quentin
1 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
2 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
...
Hermila
6 days ago
I think the answer is B) /var/log/host_460352847/temp/bar/file/csv/foo.txt
upvoted 0 times
...

Save Cancel
az-700  pass4success  az-104  200-301  200-201  cissp  350-401  350-201  350-501  350-601  350-801  350-901  az-720  az-305  pl-300  

Warning: Cannot modify header information - headers already sent by (output started at /pass.php:70) in /pass.php on line 77