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 termsstatus=404 uri=/products*Filter events by field values; * is a wildcard; AND is implied
OR / NOTstatus=500 OR status=503 · NOT method=GETBoolean operators must be in capitals
comparisonsresponse_ms>1000 · status>=500Use > < >= <= != on numbers
stats| stats count avg(response_ms) as avg_ms by hostcount, sum, avg, min, max, dc, values … by field
top / rare| top limit=5 uri · | rare uriMost 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 - clientipChoose or drop columns
sort / head / tail| sort -bytes | head 5Use - for descending order
dedup / rename| dedup clientip · | rename uri AS pageRemove repeats; rename columns

Ready for the exam? Try the Splunk certification mock tests or join the Splunk Developer cohort.