Skip to content

Instantly share code, notes, and snippets.

@kjivan
Last active December 17, 2021 16:38
Show Gist options
  • Save kjivan/2e53a7833aa5b07bf0e6e45008ec02ba to your computer and use it in GitHub Desktop.
Save kjivan/2e53a7833aa5b07bf0e6e45008ec02ba to your computer and use it in GitHub Desktop.
Splunk Queries

Splunk Queries

Getting Errors

index=<index>
AND CASE("ERROR")

Java Exceptions & Stack Traces

index=<index>
| transaction startswith="CASE("ERROR")" maxevents=250 mvlist=true 
| table message

Get Errors group by Count

index=<index>
AND (error OR exception)
| table message 
| eval message=replace(message,"\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\.\d*\s","")
| stats count by message
| sort -count
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment