Splunk Search

how to display 2 numbers on in the same Single Value panel

bestSplunker
Contributor

I want to show the number of successes and failures in a single value panel. How should I do this?

splunk version: 6.4.3

Like the screenshot below, green is successful, red is failures

index = test  
|eval classification=if(eventtype="a","successful","failures")
|stats count by classification

alt text

Tags (1)
0 Karma

MuS
Legend

Hi bestSplunker,

Have a look at this run everywhere search:

| makeresults count=100 
| eval number=random() 
| streamstats sum(number) AS total 
| eval value=if(number > (total * 0.5), 100, 50) 
| stats count by value `comment("This is creating fake events ...")`
| table count 
| transpose 
| eval display='row 1' ." / ". 'row 2' 
| table display

This will create a single field with the value of 2 / 98 as an example.
I'm unsure if you can do the colouring with green and red.

Hope this helps ...

cheers, MuS

0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...