Skip to content
Tutorials Center
My learning

Topics

Lesson 36 of 36 ยท Projects and Practice

Splunk Practice Questions and Scenario Drills with Answers

Test your Splunk knowledge with scenario drills on reports, dashboards, alerts, data models, indexing, roles, security and troubleshooting, each with an answer and a self-check tool.

You have learned how reports, dashboards, alerts, data models, indexes, configuration, access control, apps and security detections fit together. This last lesson turns that knowledge into practice: a set of scenario drills, each with a model answer, followed by a self-check tool and a quiz. Try to answer before opening the explanation. The product itself is not available on this page, so the drills are about decisions and SPL you would write; the stand-ins check your reasoning.

Drills

1. Slow dashboard. A dashboard has eight panels, each with its own search over index=web for the last 30 days. It takes two minutes to load. What do you change? Answer: use a base search with a transforming command (for example stats count by status, uri_path, _time span=1h) and post-process panels from it (building dashboards); reference scheduled reports for heavy panels; or accelerate a data model and use tstats. Reduce the default time range to 24 hours.

2. Alert storm. An alert on failed logins sends 60 emails in one hour during an incident. What do you change? Answer: add throttling (suppress for 30-60 minutes, by src if triggering per result), aggregate in the search (stats count by src | where count>20) so one row represents one source, and send results as a single email (alerts).

3. Skipped reports. Twenty reports are scheduled at 0 * * * * and some show skipped. Why, and what is the fix? Answer: they all start at minute 0 and the scheduler hits its concurrency limit. Spread the cron minutes, add a schedule window, and give important searches higher priority (reports).

4. A data model returns nothing. | tstats count from datamodel=Authentication is empty, but index=auth has events. List the checks. Answer: are the events tagged authentication (event type plus tag)? Are the field names CIM names with an action value? Is the index included in the CIM add-on's index allow-list setting for that model? Is the model accelerated and built (summariesonly=true returns only summarized data)? Is the time range right (CIM)?

5. Wrong timestamps. Events appear 5 hours in the past. What do you check? Answer: the time zone: the source has no zone, so Splunk assumed the forwarder's or indexer's zone. Set TZ in props.conf for that sourcetype (or include %z in TIME_FORMAT) on the first parsing instance (props).

6. Retention complaint. Management says logs from 100 days ago are gone, but you set 180 days. Why? Answer: maxTotalDataSizeMB was reached first, so older buckets were frozen early. Raise the size or add storage; the size rule and the age rule both apply (indexes).

7. Access. A helpdesk role should see app data but not events with sourcetype=pci:*. Answer: a role with srchIndexesAllowed = app and srchFilter = NOT sourcetype=pci:*, or put PCI data in a separate index that the role cannot search (roles). The separate index is safer.

8. A shared report fails for colleagues. It works for its owner. Answer: the report uses a private lookup or macro, or an index the colleagues cannot read. Share the dependencies at the same level, and check role index access.

9. Missing data from one server. What do you check, in order? Answer: forwarder running and connected (splunk list forward-server), input status (splunk list inputstatus), file permissions, index name, index=_internal host=<server> errors, blocked queues on the indexer, timestamps (troubleshooting).

10. Licence over quota. A new application tripled your daily volume. What do you do? Answer: find it with license_usage.log by idx and st, talk to the owner, reduce at the source, filter or route, and only then consider a larger license (capacity project).

Try it: SPL hygiene checker (stand-in)

Good searches name an index, restrict the time, filter early and avoid leading wildcards. This stand-in lints a search string with simple rules, a tiny version of what review checklists do.

Python Stand-in: a linter for search strings

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Try it: a self-scoring practice set (stand-in)

Python Stand-in: score your answers

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

SPL exercises (write the search, then compare)

  1. Count 5xx responses per host in the last 24 hours, highest first. index=web status>=500 earliest=-24h | stats count by host | sort - count
  2. Show the 10 users with the most failed logins in the last hour. index=auth action=failure earliest=-1h | top limit=10 user
  3. Error rate per hour as a percentage. index=web | timechart span=1h count AS total, count(eval(status>=500)) AS errors | eval rate=round(errors/total*100,2)
  4. The slowest five pages by 95th percentile. index=web | stats perc95(response_time) AS p95 by uri_path | sort - p95 | head 5
  5. Use the data model: failed logins per source, fast. | tstats summariesonly=true count from datamodel=Authentication where Authentication.action=failure by Authentication.src
  6. Which indexes grew most in the last 30 days (license log)? index=_internal source=*license_usage.log type=Usage earliest=-30d | stats sum(b) AS bytes by idx | sort - bytes

If you wrote something different but equivalent, that is fine: compare results, not text. Check efficiency too: did you filter early, name the index and limit the time?

Study plan for certification

Splunk's entry-level credentials cover search and reporting, knowledge objects, data administration and detection basics. Use this plan: complete the tutorial chapters, rebuild the web and security projects in a free Splunk Enterprise trial or a free hands-on lab environment, write ten searches a day from memory, and read the official documentation for the topics in the current exam blueprint (blueprints change, so check Splunk's site). See the track page for all lessons.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. Eight dashboard panels each scan the same index for 30 days and the dashboard is slow. Best fix?

    Scanning once and reusing the results, or reading summaries, cuts the load dramatically.
  2. 2. Events appear several hours off in the past. Most likely cause?

    Set TZ or include the zone in TIME_FORMAT in props.conf on the parsing instance.
  3. 3. Data from 100 days ago vanished although retention is 180 days. Likely cause?

    Whichever of the age and size rules triggers first freezes the oldest buckets.
  4. 4. What is a safer way to hide PCI events from a role than a search filter?

    Index-level access is enforced before search and does not depend on a filter string.

Summary

  • Most Splunk problems follow patterns: too much scanning, bad schedules, missing tags or fields, wrong timestamps, size-based retention, and sharing mistakes.
  • Practice by diagnosing scenarios aloud and writing searches from memory.
  • Check efficiency (index, time range, early filters, tstats) as well as correctness.
  • Rebuild the projects, then read the official documentation for the areas you use at work.

Next: Back to the Splunk track