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!

Splunk AI Assistant for SPL | Key Use Cases to Unlock the Power of SPL

Splunk AI Assistant for SPL | Key Use Cases to Unlock the Power of SPL  The Splunk AI Assistant for SPL ...

Buttercup Games: Further Dashboarding Techniques (Part 5)

This series of blogs assumes you have already completed the Splunk Enterprise Search Tutorial as it uses the ...

Customers Increasingly Choose Splunk for Observability

For the second year in a row, Splunk was recognized as a Leader in the 2024 Gartner® Magic Quadrant™ for ...