SPLK-1002 · Question #183
What is the correct syntax to find events associated with a tag?
The correct answer is D. tag=<value>. In Splunk, the correct syntax to search for events associated with a tag is tag=<value>. This searches all fields for any event that has been tagged with the specified value. Option A (tag:<field>=<value>) is the syntax for finding events where a specific field has a given tag…
Question
What is the correct syntax to find events associated with a tag?
Options
- Atag:<field>=<value>
- Btags=<value>
- Ctags:<field>=<value>
- Dtag=<value>
How the community answered
(31 responses)- A3% (1)
- B3% (1)
- C6% (2)
- D87% (27)
Explanation
In Splunk, the correct syntax to search for events associated with a tag is tag=<value>. This searches all fields for any event that has been tagged with the specified value. Option A (tag:<field>=<value>) is the syntax for finding events where a specific field has a given tag, which is more targeted but not the general tag search syntax. Options B and C use tags (plural), which is not a valid Splunk search keyword - the correct keyword is tag (singular).
Topics
Community Discussion
No community discussion yet for this question.