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!

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 ...