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!

Building Reliable Asset and Identity Frameworks in Splunk ES

 Accurate asset and identity resolution is the backbone of security operations. Without it, alerts are ...

Cloud Monitoring Console - Unlocking Greater Visibility in SVC Usage Reporting

For Splunk Cloud customers, understanding and optimizing Splunk Virtual Compute (SVC) usage and resource ...

Automatic Discovery Part 3: Practical Use Cases

If you’ve enabled Automatic Discovery in your install of the Splunk Distribution of the OpenTelemetry ...