SPLK-1001 Basic Searching and Transforming Commands Practice Question
Exhibit
index=weblogic sourcetype=accesslog | rex "status=(?<status_code>\d+)" | stats count by status_code | where count > 100
Refer to the exhibit. An analyst runs this search and expects to see a table of status codes with their counts, filtered to those with count greater than 100. The search returns zero results even though there are many events. What is the most likely reason?
⚠ Common exam trap
Splunk often tests the misconception that a stats or where command is misordered, when the actual issue is a failed field extraction due to an incorrect regex pattern in rex.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
The rex command is incorrectly extracting the status_code field.
The rex command is incorrectly extracting the status_code field because the regular expression pattern does not match the actual format of the status codes in the events. If the pattern is wrong or the field is not captured correctly, the stats command will not find any values for status_code, resulting in zero results even though events exist. The where command then filters on a field that doesn't exist or is null, returning no rows.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
The sourcetype should be 'access_combined' instead.
Why it's wrong here
Not necessarily; sourcetype name may be correct.
- ✗
The stats command should use 'values(status_code)' instead.
Why it's wrong here
That would return a list of values, not a count, and would not solve the zero results.
- ✓
The rex command is incorrectly extracting the status_code field.
Why this is correct
If the pattern doesn't match, status_code is not extracted, leading to zero results when grouped.
- ✗
The where command should be placed before the stats command.
Why it's wrong here
That would filter before count exists, not the issue.
Go deeper
Related to this question
About these practice questions
One of 502 original SPLK-1001 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This SPLK-1001 practice question is part of Courseiva's free Splunk certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the SPLK-1001 exam.