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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

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 GA in US-AWS!

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