Splunk SPL playground
Practise Splunk searches on 160 sample web server log events. Write SPL, press Run, and work through 10 exercises that check your results, the way the Splunk Core Certified User exam expects.
Raw events index=web sourcetype=access_combined
Search
Exercises
Your solved tasks are kept on this device; add your email to track them with us.
SPL quick reference
| search terms | status=404 uri=/products* | Filter events by field values; * is a wildcard; AND is implied |
| OR / NOT | status=500 OR status=503 · NOT method=GET | Boolean operators must be in capitals |
| comparisons | response_ms>1000 · status>=500 | Use > < >= <= != on numbers |
| stats | | stats count avg(response_ms) as avg_ms by host | count, sum, avg, min, max, dc, values … by field |
| top / rare | | top limit=5 uri · | rare uri | Most or least common values with count and percent |
| eval | | eval kb=round(bytes/1024,1) | Arithmetic, round(), if(), lower(), upper(), len() |
| where | | where status>=500 AND method="POST" | Filter on any expression |
| table / fields | | table _time uri status · | fields - clientip | Choose or drop columns |
| sort / head / tail | | sort -bytes | head 5 | Use - for descending order |
| dedup / rename | | dedup clientip · | rename uri AS page | Remove repeats; rename columns |
Ready for the exam? Try the Splunk certification mock tests or join the Splunk Developer cohort.