ExamGecko
Question list
Search
Search

Question 161 - SPLK-1003 discussion

Report
Export

A security team needs to ingest a static file for a specific incident. The log file has not been collected previously and future updates to the file must not be indexed.

Which command would meet these needs?

A.
splunk add one shot / opt/ incident [data .log ---index incident
Answers
A.
splunk add one shot / opt/ incident [data .log ---index incident
B.
splunk edit monitor /opt/incident/data.* ---index incident
Answers
B.
splunk edit monitor /opt/incident/data.* ---index incident
C.
splunk add monitor /opt/incident/data.log ---index incident
Answers
C.
splunk add monitor /opt/incident/data.log ---index incident
D.
splunk edit oneshot [opt/ incident/data.* ---index incident
Answers
D.
splunk edit oneshot [opt/ incident/data.* ---index incident
Suggested answer: A

Explanation:

The correct answer is A. splunk add one shot / opt/ incident [data . log ---index incident

According to the Splunk documentation1, the splunk add one shot command adds a single file or directory to the Splunk index and then stops monitoring it. This is useful for ingesting static files that do not change or update. The command takes the following syntax:

splunk add one shot <file> -index <index_name>

The file parameter specifies the path to the file or directory to be indexed. The index parameter specifies the name of the index where the data will be stored. If the index does not exist, Splunk will create it automatically.

Option B is incorrect because the splunk edit monitor command modifies an existing monitor input, which is used for ingesting files or directories that change or update over time. This command does not create a new monitor input, nor does it stop monitoring after indexing.

Option C is incorrect because the splunk add monitor command creates a new monitor input, which is also used for ingesting files or directories that change or update over time. This command does not stop monitoring after indexing.

Option D is incorrect because the splunk edit oneshot command does not exist. There is no such command in the Splunk CLI.

asked 23/09/2024
IGNACIO CHICO TORRES
37 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first