Splunk Search

Single value visualization on mutliple-series result

Simon
Contributor

I have a search using the rangemap command which generates a table with three fields, e.g.:

domain | uptime | range
example.com | 99.5 | yellow
mydomain.com | 99.999 | green
anotherdomain.com | 99.2 | red

Is there a way to get a single value visualization on each series to include in a dashboard, either with simple or advanced xml?

Thanks
Simon

Tags (3)
0 Karma
1 Solution

melting
Splunk Employee
Splunk Employee

I think that is a great idea.

I have done something similar to this by separating the range into several series, where each entry only shows up in one series, then using stackmode "stacked". This can be done in either simple or advanced xml. Take a look at the table I would try to create:

domain | red | yellow | green 
example.com | 0 | 1 | 0
mydomain.com | 0 | 0 | 1
anotherdomain.com | 1 | 0 | 0

Step 1 - search:

index=_internal | stats count by sourcetype | rangemap field=count green=0-100 yellow=101-1000 default=red | eval red=if(range=="red", 1, 0) | eval yellow=if(range=="yellow", 1, 0) | eval green=if(range=="green", 1, 0) | table sourcetype red yellow green

Step 2 - graph - add this to a panel in a dashboard and edit visualization to be column in stacked mode

Step 3 - change the series color to match - check the docs here

View solution in original post

melting
Splunk Employee
Splunk Employee

I think that is a great idea.

I have done something similar to this by separating the range into several series, where each entry only shows up in one series, then using stackmode "stacked". This can be done in either simple or advanced xml. Take a look at the table I would try to create:

domain | red | yellow | green 
example.com | 0 | 1 | 0
mydomain.com | 0 | 0 | 1
anotherdomain.com | 1 | 0 | 0

Step 1 - search:

index=_internal | stats count by sourcetype | rangemap field=count green=0-100 yellow=101-1000 default=red | eval red=if(range=="red", 1, 0) | eval yellow=if(range=="yellow", 1, 0) | eval green=if(range=="green", 1, 0) | table sourcetype red yellow green

Step 2 - graph - add this to a panel in a dashboard and edit visualization to be column in stacked mode

Step 3 - change the series color to match - check the docs here

Simon
Contributor

This is a great solution, thanks!

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Introducing Splunk 10.0: Smarter, Faster, and More Powerful Than Ever

Now On Demand Whether you're managing complex deployments or looking to future-proof your data ...

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...