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!

Splunk Lantern | Getting Started with Edge Processor, Machine Learning Toolkit ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...

Enterprise Security Content Update (ESCU) | New Releases

In the last month, the Splunk Threat Research Team (STRT) has had 2 releases of new security content via the ...

Announcing the 1st Round Champion’s Tribute Winners of the Great Resilience Quest

We are happy to announce the 20 lucky questers who are selected to be the first round of Champion's Tribute ...