<?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: How can I create a panel that calculates everything and changes the panel color based on the value of Percent Users Online? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-create-a-panel-that-calculates-everything-and-changes/m-p/358087#M23313</link>
    <description>&lt;P&gt;Try this run anywhere search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;dashboard&amp;gt;
  &amp;lt;label&amp;gt;singlevalue&amp;lt;/label&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;single&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;index=_internal|eval percentage="90"|table percentage &amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;-15m&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;none&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","0x6db7c6","0xf7bc38","0xf58f39","0xd93f3c"]&amp;lt;/option&amp;gt;
        &amp;lt;option name="rangeValues"&amp;gt;[0,30,70,100]&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;
  &amp;lt;/row&amp;gt;
&amp;lt;/dashboard&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 06 Feb 2018 16:57:54 GMT</pubDate>
    <dc:creator>493669</dc:creator>
    <dc:date>2018-02-06T16:57:54Z</dc:date>
    <item>
      <title>How can I create a panel that calculates everything and changes the panel color based on the value of Percent Users Online?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-create-a-panel-that-calculates-everything-and-changes/m-p/358086#M23312</link>
      <description>&lt;P&gt;Greetings,&lt;/P&gt;

&lt;P&gt;I have a code that calculates a percentage based on the value of two other panels I have. What I want to do is, Instead of having 3 different panels (ie. 1 for Total Registered Users, 1 for Total Online Users, and 1 for the Percent of Users Online), I want to have 1 panel that calculates everything and changes the panel color based on the value of Percent Users Online. The panel needs to display the Total Online Users.&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/4310i954A0329859AD331/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Feb 2018 16:02:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-create-a-panel-that-calculates-everything-and-changes/m-p/358086#M23312</guid>
      <dc:creator>albinortiz</dc:creator>
      <dc:date>2018-02-06T16:02:14Z</dc:date>
    </item>
    <item>
      <title>Re: How can I create a panel that calculates everything and changes the panel color based on the value of Percent Users Online?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-create-a-panel-that-calculates-everything-and-changes/m-p/358087#M23313</link>
      <description>&lt;P&gt;Try this run anywhere search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;dashboard&amp;gt;
  &amp;lt;label&amp;gt;singlevalue&amp;lt;/label&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;single&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;index=_internal|eval percentage="90"|table percentage &amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;-15m&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;none&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","0x6db7c6","0xf7bc38","0xf58f39","0xd93f3c"]&amp;lt;/option&amp;gt;
        &amp;lt;option name="rangeValues"&amp;gt;[0,30,70,100]&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;
  &amp;lt;/row&amp;gt;
&amp;lt;/dashboard&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 06 Feb 2018 16:57:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-create-a-panel-that-calculates-everything-and-changes/m-p/358087#M23313</guid>
      <dc:creator>493669</dc:creator>
      <dc:date>2018-02-06T16:57:54Z</dc:date>
    </item>
    <item>
      <title>Re: How can I create a panel that calculates everything and changes the panel color based on the value of Percent Users Online?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-create-a-panel-that-calculates-everything-and-changes/m-p/358088#M23314</link>
      <description>&lt;P&gt;Alright so I was looking at your code piece and it does what it is intended however, I am running into something I don't quite understand.&lt;/P&gt;

&lt;P&gt;Here is the code I am using:&lt;/P&gt;

&lt;P&gt;Index=winevents | dedup host&lt;BR /&gt;
| stats count as TotalActiveHosts&lt;BR /&gt;
| append [ ldapsearch search = "(objectClass = computer)" attrs = "cn, operatingSysem, operatingSystemVersion"&lt;BR /&gt;
| lookup dnslookup clienthost AS cn&lt;BR /&gt;
| search (operatingSystem = "Win*")&lt;BR /&gt;
| stats count as TotalWinClients&lt;BR /&gt;
| append [ makeresults&lt;BR /&gt;
| eval Percent = round ((TotalActiveHosts/TotalWinClients) * 100, 1) ]&lt;/P&gt;

&lt;P&gt;So here's my issue: I want to be able to display the TotalActiveHosts and change its color based on the percentage that is being calculated.&lt;/P&gt;

&lt;P&gt;Maybe this gives you a clearer picture. All the help I can get is greatly appreciated.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Feb 2018 15:33:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-create-a-panel-that-calculates-everything-and-changes/m-p/358088#M23314</guid>
      <dc:creator>albinortiz</dc:creator>
      <dc:date>2018-02-07T15:33:58Z</dc:date>
    </item>
  </channel>
</rss>

