<?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: Green/Red indicator of health in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Green-Red-indicator-of-health/m-p/465472#M191689</link>
    <description>&lt;P&gt;Thank you.  This should work...thought there was some kind of "magic"  spl . &lt;/P&gt;

&lt;P&gt;Do you know how to show the activity with 0 counts as well?  Right now I only see the activity ones with counts 1 or greater. &lt;/P&gt;</description>
    <pubDate>Thu, 29 Aug 2019 05:22:52 GMT</pubDate>
    <dc:creator>dwong2</dc:creator>
    <dc:date>2019-08-29T05:22:52Z</dc:date>
    <item>
      <title>Green/Red indicator of health</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Green-Red-indicator-of-health/m-p/465470#M191687</link>
      <description>&lt;P&gt;I have a basic search that returns multiple results.&lt;/P&gt;

&lt;P&gt;| stats count by activity  &lt;/P&gt;

&lt;P&gt;....which returns these results.&lt;/P&gt;

&lt;P&gt;activity   counts&lt;BR /&gt;
Open        24&lt;BR /&gt;
Closed       2&lt;BR /&gt;
Conflict      5&lt;BR /&gt;
Empty      100&lt;/P&gt;

&lt;P&gt;Is there a way to create a report or dashboard to show green or red for each respective activity.   If there is at least 1 count then red, and if there are no counts per activity then green?&lt;/P&gt;</description>
      <pubDate>Wed, 28 Aug 2019 21:02:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Green-Red-indicator-of-health/m-p/465470#M191687</guid>
      <dc:creator>dwong2</dc:creator>
      <dc:date>2019-08-28T21:02:38Z</dc:date>
    </item>
    <item>
      <title>Re: Green/Red indicator of health</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Green-Red-indicator-of-health/m-p/465471#M191688</link>
      <description>&lt;P&gt;Add a table to you dashboard with your search.&lt;BR /&gt;
On the top of the count column you’ll have a pencil to edit the column. There you can make custom behavior like changing color depending on a range, value, etc&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/7591iC5622271F718F6D7/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>Wed, 28 Aug 2019 22:50:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Green-Red-indicator-of-health/m-p/465471#M191688</guid>
      <dc:creator>diogofgm</dc:creator>
      <dc:date>2019-08-28T22:50:14Z</dc:date>
    </item>
    <item>
      <title>Re: Green/Red indicator of health</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Green-Red-indicator-of-health/m-p/465472#M191689</link>
      <description>&lt;P&gt;Thank you.  This should work...thought there was some kind of "magic"  spl . &lt;/P&gt;

&lt;P&gt;Do you know how to show the activity with 0 counts as well?  Right now I only see the activity ones with counts 1 or greater. &lt;/P&gt;</description>
      <pubDate>Thu, 29 Aug 2019 05:22:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Green-Red-indicator-of-health/m-p/465472#M191689</guid>
      <dc:creator>dwong2</dc:creator>
      <dc:date>2019-08-29T05:22:52Z</dc:date>
    </item>
    <item>
      <title>Re: Green/Red indicator of health</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Green-Red-indicator-of-health/m-p/465473#M191690</link>
      <description>&lt;P&gt;you only see the ones with activity because its your "by" clause. You can add something like this before your stats command:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;|eval activity = coalesce(activity,"No activity")&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;What this does is every event will have the activity field filed with whatever comes first as not null in the coalesce. Meaning:&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;if an event has activity = "open" the coalesce result will be "open" so activity value will be "open"&lt;/LI&gt;
&lt;LI&gt;if and event doesn't have activity the coalesceresult will be "No activity" so activity value will be "No activity"&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;This way the "by activity" clause will have results for all events you are searching. &lt;BR /&gt;
NOTE: this, depending on your raw data, might need some tweaking. But just play with it. coalesce can take any number of fields and returns always the first not null value. &lt;/P&gt;

&lt;P&gt;Other approach, if you do not want to have the "No activity" result is to use lookups and join.&lt;BR /&gt;
&lt;STRONG&gt;Step 1&lt;/STRONG&gt;&lt;BR /&gt;
Build a csv (e.g activity_list.csv) with the activity and count fields&lt;BR /&gt;
"activity","count"&lt;BR /&gt;
"open","0"&lt;BR /&gt;
"closed","0"&lt;BR /&gt;
...&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Step 2&lt;/STRONG&gt;&lt;BR /&gt;
after your lookup use:&lt;BR /&gt;
&lt;CODE&gt;| join activity type=left [|inputlookup activity_list.csv ]&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;this will add whatever activity is missing from the results and present in the csv with count as "0"&lt;/P&gt;

&lt;P&gt;Hope this helps!&lt;/P&gt;</description>
      <pubDate>Thu, 29 Aug 2019 11:41:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Green-Red-indicator-of-health/m-p/465473#M191690</guid>
      <dc:creator>diogofgm</dc:creator>
      <dc:date>2019-08-29T11:41:47Z</dc:date>
    </item>
    <item>
      <title>Re: Green/Red indicator of health</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Green-Red-indicator-of-health/m-p/465474#M191691</link>
      <description>&lt;P&gt;Not sure how to use lookups but I created a csv file like your example comma separated in one column.  So I created the lookup table followed by the lookup definition. I  am unsure to use the lookup.&lt;/P&gt;

&lt;P&gt;index=mysearch sourcetype=mysource &lt;BR /&gt;
| join activity type=left [|inputlookup activity.csv]&lt;BR /&gt;
| chart count by activity&lt;/P&gt;</description>
      <pubDate>Tue, 10 Sep 2019 20:40:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Green-Red-indicator-of-health/m-p/465474#M191691</guid>
      <dc:creator>dwong2</dc:creator>
      <dc:date>2019-09-10T20:40:01Z</dc:date>
    </item>
    <item>
      <title>Re: Green/Red indicator of health</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Green-Red-indicator-of-health/m-p/465475#M191692</link>
      <description>&lt;P&gt;I'm looking to have something along these lines:&lt;/P&gt;

&lt;P&gt;open  8&lt;BR /&gt;
closed 4&lt;BR /&gt;
stuck 0&lt;BR /&gt;
locked 0&lt;/P&gt;</description>
      <pubDate>Tue, 10 Sep 2019 20:47:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Green-Red-indicator-of-health/m-p/465475#M191692</guid>
      <dc:creator>dwong2</dc:creator>
      <dc:date>2019-09-10T20:47:11Z</dc:date>
    </item>
  </channel>
</rss>

