<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Splunk server status dashboard - code issue in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Splunk-server-status-dashboard-code-issue/m-p/305651#M19467</link>
    <description>&lt;P&gt;Hi bbraun,&lt;BR /&gt;
I usually use this search to diplay server status (where Perimeter.csv is a lookup containing all the server in my perimeter to monitor):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| metasearch index=_internal earliest=-300s latest=now
| eval host=upper(host) 
| stats count by host 
| append [ 
     | inputlookup Perimeter.csv 
     | eval count=0, host=upper(host)  
     ] 
| stats sum(count) AS Total by host 
| rangemap field=Total severe=0-0 low=1-1000000000 default=severe 
| table host range
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I display status in graphic mode, to do this follw indications in "Table Icon Set (Rangemap)" dashboard of "Splunk 6.x Dashboard Examples" App.&lt;/P&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
    <pubDate>Fri, 25 Aug 2017 08:27:18 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2017-08-25T08:27:18Z</dc:date>
    <item>
      <title>Splunk server status dashboard - code issue</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Splunk-server-status-dashboard-code-issue/m-p/305647#M19463</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I've done a lot of research and have applied many different "fixes" but none have seemed to work.  &lt;/P&gt;

&lt;P&gt;I'm trying to build a Splunk server status dashboard that shows either "OK" or "down".  The two values that I'm working with are 0 and 1.  0 being OK and 1 being down.  &lt;/P&gt;

&lt;P&gt;I've tried adding rangemap (|rangemap field=Status low=0-0 severe=1-1 ) which didn't resolve my issue. &lt;/P&gt;

&lt;P&gt;Can someone look at my code and determine what I'm doing wrong?&lt;/P&gt;

&lt;P&gt;my version is 6.5.2&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;dashboard&amp;gt;
  &amp;lt;label&amp;gt;SplunkHealth&amp;lt;/label&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;title&amp;gt;Indexer 01&amp;lt;/title&amp;gt;
      &amp;lt;single&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;|inputlookup all_servers.csv  | eval splunk_server=host  | join type=left   splunk_server [|rest /services/server/info]  | join type=left splunk_server [| rest /services/server/status/resource-usage/hostwide ]|fillnull value="Non-Reporting" | eval   Status=if(updated="Non-Reporting",1,0)  |rename splunk_server AS Server| search role=indexer |search Server=slpsplnkidl01 | table Status | eval Status=case(Status=0, "OK", Status=1, "DOWN")&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;-24h@h&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
          &amp;lt;sampleRatio&amp;gt;1&amp;lt;/sampleRatio&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="colorBy"&amp;gt;value&amp;lt;/option&amp;gt;
        &amp;lt;option name="colorMode"&amp;gt;block&amp;lt;/option&amp;gt;
        &amp;lt;option name="drilldown"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="numberPrecision"&amp;gt;0&amp;lt;/option&amp;gt;
        &amp;lt;option name="rangeColors"&amp;gt;["0x65a637","0xd93f3c"]&amp;lt;/option&amp;gt;
        &amp;lt;option name="rangeValues"&amp;gt;[0,1]&amp;lt;/option&amp;gt;
        &amp;lt;option name="field"&amp;gt;Status&amp;lt;/option&amp;gt;
        &amp;lt;option name="showSparkline"&amp;gt;1&amp;lt;/option&amp;gt;
        &amp;lt;option name="showTrendIndicator"&amp;gt;1&amp;lt;/option&amp;gt;
        &amp;lt;option name="trendColorInterpretation"&amp;gt;standard&amp;lt;/option&amp;gt;
        &amp;lt;option name="trendDisplayMode"&amp;gt;absolute&amp;lt;/option&amp;gt;
        &amp;lt;option name="unitPosition"&amp;gt;after&amp;lt;/option&amp;gt;
        &amp;lt;option name="useColors"&amp;gt;1&amp;lt;/option&amp;gt;
        &amp;lt;option name="useThousandSeparators"&amp;gt;1&amp;lt;/option&amp;gt;
      &amp;lt;/single&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
&amp;lt;/dashboard&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 24 Aug 2017 23:33:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Splunk-server-status-dashboard-code-issue/m-p/305647#M19463</guid>
      <dc:creator>bbraun</dc:creator>
      <dc:date>2017-08-24T23:33:20Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk server status dashboard - code issue</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Splunk-server-status-dashboard-code-issue/m-p/305648#M19464</link>
      <description>&lt;P&gt;What's the problem?&lt;/P&gt;</description>
      <pubDate>Fri, 25 Aug 2017 00:35:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Splunk-server-status-dashboard-code-issue/m-p/305648#M19464</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2017-08-25T00:35:00Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk server status dashboard - code issue</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Splunk-server-status-dashboard-code-issue/m-p/305649#M19465</link>
      <description>&lt;P&gt;If colors is the issue try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; &amp;lt;option name="charting.fieldColors"&amp;gt;{"DOWN":0xFF0000,"OK":0x00FF00}&amp;lt;/option&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Basically saying if the value of Status is DOWN, red, if it's OK, green.&lt;/P&gt;</description>
      <pubDate>Fri, 25 Aug 2017 00:39:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Splunk-server-status-dashboard-code-issue/m-p/305649#M19465</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2017-08-25T00:39:59Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk server status dashboard - code issue</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Splunk-server-status-dashboard-code-issue/m-p/305650#M19466</link>
      <description>&lt;P&gt;When I add that line I receive the below error.&lt;/P&gt;

&lt;P&gt;Warning on line 18:     Unknown option name="charting.fieldColors" for node="single" &lt;/P&gt;

&lt;P&gt;Should if be added to a specific line?  Does any need to be removed?&lt;/P&gt;</description>
      <pubDate>Fri, 25 Aug 2017 01:33:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Splunk-server-status-dashboard-code-issue/m-p/305650#M19466</guid>
      <dc:creator>bbraun</dc:creator>
      <dc:date>2017-08-25T01:33:10Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk server status dashboard - code issue</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Splunk-server-status-dashboard-code-issue/m-p/305651#M19467</link>
      <description>&lt;P&gt;Hi bbraun,&lt;BR /&gt;
I usually use this search to diplay server status (where Perimeter.csv is a lookup containing all the server in my perimeter to monitor):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| metasearch index=_internal earliest=-300s latest=now
| eval host=upper(host) 
| stats count by host 
| append [ 
     | inputlookup Perimeter.csv 
     | eval count=0, host=upper(host)  
     ] 
| stats sum(count) AS Total by host 
| rangemap field=Total severe=0-0 low=1-1000000000 default=severe 
| table host range
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I display status in graphic mode, to do this follw indications in "Table Icon Set (Rangemap)" dashboard of "Splunk 6.x Dashboard Examples" App.&lt;/P&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Fri, 25 Aug 2017 08:27:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Splunk-server-status-dashboard-code-issue/m-p/305651#M19467</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2017-08-25T08:27:18Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk server status dashboard - code issue</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Splunk-server-status-dashboard-code-issue/m-p/305652#M19468</link>
      <description>&lt;P&gt;yes charting.fieldColors is for charts and not "single" panels. &lt;/P&gt;</description>
      <pubDate>Fri, 25 Aug 2017 09:57:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Splunk-server-status-dashboard-code-issue/m-p/305652#M19468</guid>
      <dc:creator>DavidHourani</dc:creator>
      <dc:date>2017-08-25T09:57:21Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk server status dashboard - code issue</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Splunk-server-status-dashboard-code-issue/m-p/305653#M19469</link>
      <description>&lt;P&gt;Hello bbraun,&lt;/P&gt;

&lt;P&gt;You can do this via GUI by simply setting the color range when you click on --&amp;gt;  Format Visualization -&amp;gt; color.&lt;BR /&gt;
No need to edit this via code or anything. Your source should have the options bellow afterwards:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;panel&amp;gt;
  &amp;lt;single&amp;gt;
    &amp;lt;title&amp;gt;your title&amp;lt;/title&amp;gt;
    &amp;lt;search&amp;gt;
      &amp;lt;query&amp;gt;your search&amp;lt;/query&amp;gt;
      &amp;lt;earliest&amp;gt;$date1.earliest$&amp;lt;/earliest&amp;gt;
      &amp;lt;latest&amp;gt;$date1.latest$&amp;lt;/latest&amp;gt;
    &amp;lt;/search&amp;gt;
    &amp;lt;option name="colorMode"&amp;gt;block&amp;lt;/option&amp;gt;
    &amp;lt;option name="rangeColors"&amp;gt;["0x65a637","0xd93f3c"]&amp;lt;/option&amp;gt;
    &amp;lt;option name="rangeValues"&amp;gt;[0]&amp;lt;/option&amp;gt;
    &amp;lt;option name="useColors"&amp;gt;1&amp;lt;/option&amp;gt;
  &amp;lt;/single&amp;gt;
&amp;lt;/panel&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Let me know how that goes for you.&lt;/P&gt;

&lt;P&gt;Regards,&lt;BR /&gt;
David&lt;/P&gt;</description>
      <pubDate>Fri, 25 Aug 2017 10:03:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Splunk-server-status-dashboard-code-issue/m-p/305653#M19469</guid>
      <dc:creator>DavidHourani</dc:creator>
      <dc:date>2017-08-25T10:03:59Z</dc:date>
    </item>
  </channel>
</rss>

