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!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...