Splunk Search

Timechart with different bar color

pankajad
Explorer

My splunk query is

index=abc "Server started successfully"  OR "Get Operation" OR "POST operation" OR "Error occurred"

I want to get a timechart which shows when each these events occurred. Probably bar having a different color for each event or any other way which lets me identify if there was any "Get Operation" OR "POST Operation" between "Server started successfully" and "Error occurred"

0 Karma
1 Solution

aohls
Contributor

Not the cleanest but I should work to get a timechart counting the number of occurrences for each:

| eval result = case(like(_raw, "%Server started successfully%"),"Server started successfully",like(_raw, "%Get Operation%"),"Get Operation",like(_raw, "%POST operation%"),"POST operation",like(_raw, "%Error occurred%"),"Error occurred")
| timechart count(_raw) by result

View solution in original post

aohls
Contributor

Not the cleanest but I should work to get a timechart counting the number of occurrences for each:

| eval result = case(like(_raw, "%Server started successfully%"),"Server started successfully",like(_raw, "%Get Operation%"),"Get Operation",like(_raw, "%POST operation%"),"POST operation",like(_raw, "%Error occurred%"),"Error occurred")
| timechart count(_raw) by result
Get Updates on the Splunk Community!

Observability | How to Think About Instrumentation Overhead (White Paper)

Novice observability practitioners are often overly obsessed with performance. They might approach ...

Cloud Platform | Get Resiliency in the Cloud Event (Register Now!)

IDC Report: Enterprises Gain Higher Efficiency and Resiliency With Migration to Cloud  Today many enterprises ...

The Great Resilience Quest: 10th Leaderboard Update

The tenth leaderboard update (11.23-12.05) for The Great Resilience Quest is out >> As our brave ...