Courseiva
Advanced Searching and StatisticsmediumMultiple ChoiceObjective-mapped

SPLK-1002 Advanced Searching and Statistics Practice Question

A security analyst wants to find IP addresses that have attempted to access a specific URL more than 5 times in the last hour and also have a user agent string containing "curl". They need to use a subsearch to pre-filter IPs. Which search is correct?

⚠ Common exam trap

Candidates often confuse a subsearch with a simple filter or stats command, leading them to choose options that either omit the subsearch syntax or place it incorrectly, such as at the start without proper piping.

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 sourcetype=access [search useragent=*curl* | stats count by src_ip | where count>5 | fields src_ip] | stats count by src_ip | where count>5

It uses a subsearch to first find IPs that have accessed the URL more than 5 times with a user agent containing 'curl', then passes those IPs to the outer search to filter the original data. The subsearch returns a list of src_ip values, which the outer search uses as a filter, ensuring only IPs meeting both conditions are counted again. This matches the requirement to pre-filter IPs using a subsearch.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • [search index=web sourcetype=access useragent=*curl* | stats count by src_ip | where count>5] | fields src_ip

    Why it's wrong here

    Subsearch returns only fields, not a search string for main search.

  • index=web sourcetype=access [search useragent=*curl* | stats count by src_ip | where count>5 | fields src_ip] | stats count by src_ip | where count>5

    Why this is correct

    Correctly uses subsearch to filter IPs, then counts and filters.

  • index=web sourcetype=access | search useragent=*curl* | stats count by src_ip | where count>5

    Why it's wrong here

    Does not use a subsearch as required.

  • index=web sourcetype=access ( useragent=*curl* ) | stats count by src_ip | where count>5

    Why it's wrong here

    Syntax error: missing search prefix and parentheses misuse.

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.