Splunk Enterprise Security

Display a pie from different values summing some of them

canyavall
New Member

Hi All, I need to show a pie for failed and succeed values, we know those values from the field "type" but 3 of them would be considered failed and 1 succeed

This is the current search:
type="bootup.bootupFailed" OR type="ForcedPortalReload" OR type="ClassLoadingFailed" OR type="allWidgetsInitializedAndLoaded" | stats dc(devRef) count by type

Of course this one is showing me a pie with all 4... but I need the pie to show only succeed and failed
failed -> type="bootup.bootupFailed" OR type="ForcedPortalReload" OR type="ClassLoadingFailed"
succeed -> type="allWidgetsInitializedAndLoaded"

How can I do it?

0 Karma
1 Solution

richgalloway
SplunkTrust
SplunkTrust

Try this

type="bootup.bootupFailed" OR type="ForcedPortalReload" OR type="ClassLoadingFailed" OR type="allWidgetsInitializedAndLoaded" 
| eval type = case(type=="allWidgetsInitializedAndLoaded", "succeed", 1==1, "failed")
| stats dc(devRef) count by type
---
If this reply helps you, Karma would be appreciated.

View solution in original post

0 Karma

richgalloway
SplunkTrust
SplunkTrust

Try this

type="bootup.bootupFailed" OR type="ForcedPortalReload" OR type="ClassLoadingFailed" OR type="allWidgetsInitializedAndLoaded" 
| eval type = case(type=="allWidgetsInitializedAndLoaded", "succeed", 1==1, "failed")
| stats dc(devRef) count by type
---
If this reply helps you, Karma would be appreciated.
0 Karma

canyavall
New Member

Awesome, thank you very much!!!

I already checked the command case for eval, now I understand it, thank you!!

0 Karma
Get Updates on the Splunk Community!

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...