<?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 charting an event with a binary state? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/charting-an-event-with-a-binary-state/m-p/72585#M3929</link>
    <description>&lt;P&gt;I'm looking to create a view that shows whether a service is up or down.  Does anyone have an example of how to chart a sort of green light/red light display on a view?&lt;/P&gt;</description>
    <pubDate>Fri, 01 Apr 2011 01:04:16 GMT</pubDate>
    <dc:creator>dang</dc:creator>
    <dc:date>2011-04-01T01:04:16Z</dc:date>
    <item>
      <title>charting an event with a binary state?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/charting-an-event-with-a-binary-state/m-p/72585#M3929</link>
      <description>&lt;P&gt;I'm looking to create a view that shows whether a service is up or down.  Does anyone have an example of how to chart a sort of green light/red light display on a view?&lt;/P&gt;</description>
      <pubDate>Fri, 01 Apr 2011 01:04:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/charting-an-event-with-a-binary-state/m-p/72585#M3929</guid>
      <dc:creator>dang</dc:creator>
      <dc:date>2011-04-01T01:04:16Z</dc:date>
    </item>
    <item>
      <title>Re: charting an event with a binary state?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/charting-an-event-with-a-binary-state/m-p/72586#M3930</link>
      <description>&lt;P&gt;dang,&lt;/P&gt;

&lt;P&gt;Assuming you have a field called 'state' with binary values 0/1 you could do something like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;my search&amp;gt; | head 1 | rangemap field=state low=0 default=severe
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;In the above search "head 1" get's us the last state.  You could also do this with 'stats last(state)'.  Rangemap is a command that maps field values into ranges.  In this case we map 0 to low (green) and 1 to severe (red)&lt;/P&gt;

&lt;P&gt;See also:&lt;/P&gt;

&lt;P&gt;&lt;A href="http://answers.splunk.com/questions/6777/add-image-to-search/13265#13265" rel="nofollow"&gt;http://answers.splunk.com/questions/6777/add-image-to-search/13265#13265&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;&lt;A href="http://answers.splunk.com/questions/7732/rangemap-command" rel="nofollow"&gt;http://answers.splunk.com/questions/7732/rangemap-command&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;&lt;A href="http://www.splunk.com/base/Documentation/4.2/Developer/AddASingleButton" rel="nofollow"&gt;http://www.splunk.com/base/Documentation/4.2/Developer/AddASingleButton&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Apr 2011 01:40:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/charting-an-event-with-a-binary-state/m-p/72586#M3930</guid>
      <dc:creator>hazekamp</dc:creator>
      <dc:date>2011-04-01T01:40:58Z</dc:date>
    </item>
  </channel>
</rss>

