Splunk Search

How to create a PIE chart for multiple subsearches?

vkumar6
Explorer

Hi

How can I create a PIE chart using multiple subsearches?

notable | search source="ENV: Windows Privilege Escalation" OR source="ENV:interactive login" OR source="Env:Concurrent Login Attempts Detected" | stats count as Win | appendcols [search notable | search source="ENV*virus" OR source=malware| stats count as AV] | appendcols [search notable | search source="env*intrusion" | stats count as Intrusion] | appendcols [search notable | search source="env*email" | stats count as Email] | appendcols [search notable | search source="env*vul" | stats count as Vuler]

Tags (2)
0 Karma

somesoni2
SplunkTrust
SplunkTrust

Try this

`notable` | search source="*ENV: Windows Privilege Escalation*" OR source="*ENV:interactive login*" OR source="*Env:Concurrent Login Attempts Detected*"  | stats count | eval Type="Win" | append  [search `notable` | search source="*ENV*virus*" OR source=*malware*| stats count | eval Type="AV"] | append [search `notable` | search source="*env*intrusion*" | stats count | eval Type="Intrusion" ] | append [search `notable` | search source="*env*email*" | stats count | eval Type="Email" ] | append [search `notable` | search source="*env*vul*" | stats count | eval Type="Vuler"] 

OR Better...

`notable` 
| search (source="*ENV: Windows Privilege Escalation*" OR source="*ENV:interactive login*" OR source="*Env:Concurrent Login Attempts Detected*" ) OR (source="*ENV*virus*" OR source=*malware*) OR (source="*env*intrusion*") OR (source="*env*email*") OR (source="*env*vul*")
| eval Type=case((source="*ENV: Windows Privilege Escalation*" OR source="*ENV:interactive login*" OR source="*Env:Concurrent Login Attempts Detected*" ),"Win",(source="*ENV*virus*" OR source=*malware*),"AV", (source="*env*intrusion*"),"Intrusion", (source="*env*email*") ,"Email", (source="*env*vul*"),"Vulenr")
| stats count by Type
0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...