Dashboards & Visualizations

Single valued dashboard not showing colours

shiva_kolachala
Engager

Hi,

Below is my dashboard xml. But I am not getting the colours. Actually my value is 18 but the single value is only showing me the elevated but im not able to see the colours. Please help.

<?xml version='1.0' encoding='utf-8'?>
<dashboard>
  <label>Business-Dashboard</label>
  <row>
    <single>
      <searchName>AddBankAccountWeb</searchName>
      <searchString>sourcetype="webcentrl_prod_clms.logs" api_time != 0 business_process="AddBankAccountWeb" earliest=-4h | stats sum(api_time) as time by txnId |stats count as mycount | rangemap field=mycount low=100-200 elevated=0-100 default=red</searchString>
    <title>AddBankAccountWeb</title>
    </single>
  </row>
</dashboard>
Tags (3)
1 Solution

joshd
Builder

Add the option:

<option name="classField">range</option>

So it now looks like this:

<?xml version='1.0' encoding='utf-8'?>
<dashboard>
  <label>Business-Dashboard</label>
  <row>
    <single>
      <searchName>AddBankAccountWeb</searchName>
      <searchString>sourcetype="webcentrl_prod_clms.logs" api_time != 0 business_process="AddBankAccountWeb" earliest=-4h | stats sum(api_time) as time by txnId |stats count as mycount | rangemap field=mycount low=100-200 elevated=0-100 default=red</searchString>
    <title>AddBankAccountWeb</title>
    <option name="classField">range</option>
    </single>
  </row>
</dashboard>

The color mappings are controlled by the classField option as described here:

http://docs.splunk.com/Documentation/Splunk/latest/Developer/AddASingleButton

Also I'm not sure why you have default=red in your search string... this wont specify a color, this specifies the default range which can be "low", "elevated" and "severe". And note that typically the "elevated" range is higher than "low" so you may wish to change your values in your search string.

View solution in original post

joshd
Builder

Add the option:

<option name="classField">range</option>

So it now looks like this:

<?xml version='1.0' encoding='utf-8'?>
<dashboard>
  <label>Business-Dashboard</label>
  <row>
    <single>
      <searchName>AddBankAccountWeb</searchName>
      <searchString>sourcetype="webcentrl_prod_clms.logs" api_time != 0 business_process="AddBankAccountWeb" earliest=-4h | stats sum(api_time) as time by txnId |stats count as mycount | rangemap field=mycount low=100-200 elevated=0-100 default=red</searchString>
    <title>AddBankAccountWeb</title>
    <option name="classField">range</option>
    </single>
  </row>
</dashboard>

The color mappings are controlled by the classField option as described here:

http://docs.splunk.com/Documentation/Splunk/latest/Developer/AddASingleButton

Also I'm not sure why you have default=red in your search string... this wont specify a color, this specifies the default range which can be "low", "elevated" and "severe". And note that typically the "elevated" range is higher than "low" so you may wish to change your values in your search string.

Get Updates on the Splunk Community!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Wondering How to Build Resiliency in the Cloud?

IT leaders are choosing Splunk Cloud as an ideal cloud transformation platform to drive business resilience,  ...

Updated Data Management and AWS GDI Inventory in Splunk Observability

We’re making some changes to Data Management and Infrastructure Inventory for AWS. The Data Management page, ...