SPLK-1001 practice question 7 of 30

Which search string matches only events with the status_code of 4:4?

Full set: 244 questions

Domain Basic Searching

Answer options
A: status_code !=404
B: status_code>=400
C: status_code<=404
D: status code>403 status_code<405 Correct answer
Correct Answer:
D. status code>403 status_code
Explanation

The search string statuscode>403 statuscode 403 AND statuscode < 405. When evaluating numeric fields, the only integer value that satisfies both conditions (being greater than 403 and less than 405) is 404. This method effectively and exclusively filters for the desired events.

Why Incorrect

A. statuscode !=404 is incorrect because the != operator excludes all events with a statuscode of 404, which is the opposite of the requirement.
B. statuscode>=400 is incorrect because it matches a broad range of values, including 400, 401, 500, etc., not only 404.
C. statuscode<=404 is incorrect because it matches a broad range of values, including 403, 200, 301, etc., not only 404.

References

1. Splunk Enterprise Documentation

Search Manual

"Boolean expressions": This document confirms the implicit AND logic. It states

"The AND operator is implied between terms. For example

searching for weblogic system is the same as searching for weblogic AND system." This principle applies to the two expressions in the correct answer.

2. Splunk Enterprise Documentation

Search Reference

"search command": This reference details the syntax for the search command

including the use of comparison operators. Under the "Syntax" section

it lists the valid comparison operators as =

!=

<

>

<=

>=. The answer uses > and < to create a specific numeric range.

3. Splunk Enterprise Documentation

SPLK-1001 Splunk Core Certified User Courseware

"Module 5 - Using Fields": This official course material explains how to use fields in searches

including filtering with numeric comparison operators to narrow down search results. It provides examples of using >

<

and = to find events based on specific numeric field values

which is the core concept tested in this question.

Scroll to Top