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