Courseiva
Advanced Searching and StatisticsmediumMultiple ChoiceObjective-mapped

SPLK-1002 Advanced Searching and Statistics Practice Question

An analyst needs to calculate the average response time for each web server, but only for requests that returned status code 200. The field 'response_time' is numeric. Which search correctly achieves this?

⚠ Common exam trap

It's easy for candidates to confuse `eventstats` with `stats`, thinking `eventstats` can produce a summary table, or they incorrectly use `eval` with aggregation functions, not realizing that `eval` operates on individual events and cannot perform group-by calculations.

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=web status=200 | stats avg(response_time) by server

It first filters the data to only include events with status=200 using a search-time field filter, then uses the `stats` command with `avg(response_time) by server` to compute the average response time per server. This ensures that only successful requests are included in the aggregation, and the `by server` clause correctly groups the results by each web server.

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=web | transaction server maxspan=1m | stats avg(response_time) by server

    Why it's wrong here

    Transaction is for grouping related events; not appropriate for simple aggregation.

  • index=web status=200 | eventstats avg(response_time) as avg_time by server

    Why it's wrong here

    eventstats adds a field to each event but does not produce a summary table; it retains all events.

  • index=web | eval avg_time = avg(response_time) by server | search status=200

    Why it's wrong here

    eval cannot compute aggregate functions; also search after eval is inefficient.

  • index=web status=200 | stats avg(response_time) by server

    Why this is correct

    Correct: filter first, then aggregate.

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 →

How Courseiva writes practice questions · Editorial policy

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.