SPLK-1002 Advanced Searching and Statistics Practice Question
An analyst wants to create a time series chart showing the count of errors per hour over the last 24 hours. The errors are logged with sourcetype=error_log. Which search achieves this?
⚠ Common exam trap
A common mix-up: candidates confuse `chart` with `timechart`, thinking `chart count by _time` will produce a time series, but `chart` treats `_time` as a categorical field rather than a continuous time axis, leading to incorrect visualizations.
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
✓
index=main sourcetype=error_log | timechart count span=1h
`timechart count span=1h` automatically creates a time series chart with one-hour buckets over the last 24 hours, grouping events by `_time` and counting them per bucket. The `timechart` command is specifically designed for time-based aggregation and produces a chart with `_time` on the x-axis, which is exactly what the analyst needs. Options A and C incorrectly use the `chart` command which treats time as a categorical field, and Option B uses `bin` and `stats` but does not produce a time series chart directly; it only produces a table. Only `timechart` yields the desired visualization.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
index=main sourcetype=error_log | chart count over _time by hour
Why it's wrong here
Invalid timechart syntax.
- ✗
index=main sourcetype=error_log | bin _time span=1h | stats count by _time
Why it's wrong here
This works but does not create a time chart easily; timechart is preferred.
- ✗
index=main sourcetype=error_log | chart count by _time
Why it's wrong here
Missing span and can produce unexpected results.
- ✓
index=main sourcetype=error_log | timechart count span=1h
Why this is correct
Correctly produces hourly count time chart.
Go deeper
Related to this question
About these practice questions
This SPLK-1002 question is part of Courseiva's 475-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. 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-1002 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-1002 exam.