Text preview & study summary

Splunk SPLK-1001 - Core Certified User - Search SPL Fields Lookups Reports Dashboards Alerts

A free sample of 5 questions from this quiz, shown in full with answer choices and explanations. No interactivity — everything is visible on this page for study and review.

Want to test your knowledge? Launch the Interactive Exam Simulator

Question 1

An analyst notices that a Splunk search is returning too many results and taking a long time to complete. The search is: `index=* | search "error" | stats count by host`. What are the best practices to optimize this search?

Answer choices

  • A. Add `| head 10000` after the first pipe to limit events before stats

  • B. Be more specific with the index name, use field-value pairs instead of keyword search, and move the `search` filter before `stats` (Correct)

  • C. Replace `stats count by host` with `top host` for faster processing

  • D. Schedule the search as a saved report to run during off-peak hours

Explanation

Splunk search optimization best practices include: (1) Specify the index by name (not `index=*`) to avoid searching all indexes, (2) Use field-value pairs (e.g., `log_level=error`) instead of raw keyword searches when possible, (3) Apply filters as early as possible in the search pipeline (before piping to transforming commands), (4) Use the time picker to limit the search window. The filter `| search "error"` occurs after `index=*` has already retrieved all events — it should be part of the initial search clause: `index=prod_logs log_level=error | stats count by host`. Option A adds an arbitrary row limit that may cut off data. Option D defers the problem rather than solving it.

Question 2

A Splunk user wants to calculate the average response time grouped by web application endpoint for the last hour. The response time is in a field called `response_ms`. Which SPL command is most appropriate?

Answer choices

  • A. `index=web | timechart avg(response_ms) by endpoint`

  • B. `index=web | stats avg(response_ms) as avg_response by endpoint | sort -avg_response` (Correct)

  • C. `index=web | eval avg_response=avg(response_ms) | table endpoint, avg_response`

  • D. `index=web | chart response_ms by endpoint`

Explanation

The `stats` command with `avg()` aggregation function calculates the average of `response_ms` grouped by `endpoint`. Adding `sort -avg_response` orders results with highest (slowest) response times first — useful for identifying performance bottlenecks. Option A uses `timechart` which creates time-series bucketed results (not a flat average per endpoint). Option C incorrectly uses `eval` with `avg()` — `eval` doesn't perform aggregations; it evaluates per-event calculations. Option D uses `chart` without an aggregation function, which would produce a count chart. `stats` is the correct transforming command for aggregation without time buckets.

Question 3

A Splunk administrator wants to understand the difference between "Fast Mode," "Smart Mode," and "Verbose Mode" for searches. When should Verbose Mode be used?

Answer choices

  • A. Fast Mode for production dashboards; Smart Mode for general searching; Verbose Mode when field discovery and event list exploration are needed (Correct)

  • B. Verbose Mode should always be used for maximum result accuracy

  • C. Fast Mode is for real-time searches; Verbose Mode is for scheduled reports

  • D. Smart Mode and Verbose Mode are identical; only the display format changes

Explanation

Splunk search modes control the balance between speed and data completeness: Fast Mode focuses on returning results as quickly as possible — it doesn't extract all fields or build the fields sidebar, making it ideal for production dashboards and transforming searches where field discovery isn't needed. Smart Mode (default) uses fast mode behavior for transforming searches and verbose mode for event searches — a good balance for general use. Verbose Mode performs complete field extraction, populates the fields sidebar fully, and provides the most complete event information — ideal when exploring new data sources, discovering fields, or debugging field extractions. Verbose mode is slower but provides maximum insight.

Question 4

An analyst uses the following SPL search and wants to understand the result: `index=sales | stats sum(revenue) as total_revenue, count as num_transactions by product_category | eval avg_transaction=round(total_revenue/num_transactions,2)`. What does this search produce?

Answer choices

  • A. A time-series chart showing revenue per category over time

  • B. A table showing each product category with total revenue, number of transactions, and calculated average transaction value (Correct)

  • C. Individual sales events filtered by product category

  • D. A lookup that enriches future sales data with category averages

Explanation

Breaking down this SPL search: `stats sum(revenue) as total_revenue, count as num_transactions by product_category` creates a summary table with one row per product category showing the sum of all revenue values (renamed `total_revenue`) and a count of events (renamed `num_transactions`). The `eval` command then adds a calculated column `avg_transaction` by dividing total revenue by transaction count and rounding to 2 decimal places. The result is a flat summary table — not a time-series (no timechart), not individual events (stats collapses events), and not a lookup (lookups are files, not search results).

Question 5

A Splunk search is: `index=web | eval size_kb=round(bytes/1024,1) | where size_kb > 100 | stats avg(size_kb) as avg_kb, max(size_kb) as max_kb by url`. What is the logical flow of this search?

Answer choices

  • A. Filter by size, group by URL, then calculate the KB conversion and statistics

  • B. Retrieve web events, convert bytes to KB (rounded to 1 decimal), keep only events with KB > 100, then calculate average and max KB per URL (Correct)

  • C. Group by URL first, then calculate statistics, then filter by size

  • D. Convert bytes, then create a lookup table of URL statistics, then filter by size

Explanation

SPL commands execute in left-to-right pipeline order: (1) `index=web` retrieves all web events from the index, (2) `eval size_kb=round(bytes/1024,1)` adds a new field to each event converting bytes to kilobytes rounded to 1 decimal place, (3) `where size_kb > 100` filters out events with responses smaller than 100KB (keeping only large responses), (4) `stats avg(size_kb) as avg_kb, max(size_kb) as max_kb by url` aggregates the remaining events calculating average and maximum KB grouped by URL. The pipeline processes events sequentially through each stage, with each command receiving the output of the previous command.