<?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: hellp with charting search results in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/hellp-with-charting-search-results/m-p/437707#M45416</link>
    <description>&lt;P&gt;So Time field is undefined. Is this the line you are using to set Time?&lt;BR /&gt;
| rex field=_raw "(?\d{1,2})\s+hours?\s+ago"&lt;/P&gt;

&lt;P&gt;If so, then change it to:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex field=_raw "(?&amp;lt;Time&amp;gt;\d{1,2})\s+hours?\s+ago"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Also, please explain what Time is supposed to contain. The line right above assumes it is the number of "hours ago" logged.&lt;/P&gt;</description>
    <pubDate>Fri, 09 Aug 2019 19:53:09 GMT</pubDate>
    <dc:creator>jpolvino</dc:creator>
    <dc:date>2019-08-09T19:53:09Z</dc:date>
    <item>
      <title>hellp with charting search results</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/hellp-with-charting-search-results/m-p/437698#M45407</link>
      <description>&lt;P&gt;hello, i'm hoping to get help on this.  been working on it for several days, so i thought to reach out to the experts.  &lt;/P&gt;

&lt;P&gt;i am trying to chart the percentage of a process (up/down).  here's my code:&lt;/P&gt;

&lt;P&gt;search index=wineventlog* sourcetype=WinEventLog:Application SourceName=Chef &lt;BR /&gt;
   | stats values(*) as * by host&lt;BR /&gt;
   | rex field=host "(?[^.]+)." &lt;BR /&gt;
   | rex field=_raw "(?\d{1,2})\s+hours?\s+ago" &lt;BR /&gt;
   | eval process_up=case(Time&amp;gt;4,"Process Down", true(),"Process Up")&lt;BR /&gt;
   | eval host = lower(host)&lt;BR /&gt;
| table host process_up &lt;BR /&gt;
| stats count by process_up&lt;/P&gt;

&lt;P&gt;for some reason the count is only showing the process_up and not the process_down.&lt;BR /&gt;
i expect to see results like this:&lt;BR /&gt;
process_up  200&lt;BR /&gt;
process_down 12&lt;/P&gt;

&lt;P&gt;and then do a pie chart based on the expected results.  &lt;/P&gt;

&lt;P&gt;can you help this newbie? &lt;/P&gt;

&lt;P&gt;thank you so much&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 01:40:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/hellp-with-charting-search-results/m-p/437698#M45407</guid>
      <dc:creator>owie6466</dc:creator>
      <dc:date>2020-09-30T01:40:43Z</dc:date>
    </item>
    <item>
      <title>Re: hellp with charting search results</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/hellp-with-charting-search-results/m-p/437699#M45408</link>
      <description>&lt;P&gt;Try this : &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    .. | eval process=case(Time&amp;gt;4,"Process Down", 1==1,"Process Up")
    | stats count by process
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If this does not show &lt;CODE&gt;Process Up&lt;/CODE&gt; count then you should check after &lt;CODE&gt;| eval process=case(Time&amp;gt;4,"Process Down", 1==1,"Process Up")&lt;/CODE&gt; do &lt;CODE&gt;Time&lt;/CODE&gt; has anything lower than 4 ? then only it will be counted as "Process Up" otherwise it won't show.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Aug 2019 17:59:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/hellp-with-charting-search-results/m-p/437699#M45408</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2019-08-09T17:59:18Z</dc:date>
    </item>
    <item>
      <title>Re: hellp with charting search results</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/hellp-with-charting-search-results/m-p/437700#M45409</link>
      <description>&lt;P&gt;Also, in binary decisions, you can use the "if" statement, which would have caught this:&lt;BR /&gt;
    | eval process=if(Time&amp;gt;4,"Process Down","Process Up")&lt;/P&gt;</description>
      <pubDate>Fri, 09 Aug 2019 18:12:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/hellp-with-charting-search-results/m-p/437700#M45409</guid>
      <dc:creator>jpolvino</dc:creator>
      <dc:date>2019-08-09T18:12:56Z</dc:date>
    </item>
    <item>
      <title>Re: hellp with charting search results</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/hellp-with-charting-search-results/m-p/437701#M45410</link>
      <description>&lt;P&gt;thank you jpolvino!  i tried the code above but it didn't give me process.  &lt;/P&gt;</description>
      <pubDate>Fri, 09 Aug 2019 18:37:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/hellp-with-charting-search-results/m-p/437701#M45410</guid>
      <dc:creator>owie6466</dc:creator>
      <dc:date>2019-08-09T18:37:54Z</dc:date>
    </item>
    <item>
      <title>Re: hellp with charting search results</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/hellp-with-charting-search-results/m-p/437702#M45411</link>
      <description>&lt;P&gt;i tried the 'if' and also didn't show process.  &lt;/P&gt;</description>
      <pubDate>Fri, 09 Aug 2019 18:40:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/hellp-with-charting-search-results/m-p/437702#M45411</guid>
      <dc:creator>owie6466</dc:creator>
      <dc:date>2019-08-09T18:40:09Z</dc:date>
    </item>
    <item>
      <title>Re: hellp with charting search results</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/hellp-with-charting-search-results/m-p/437703#M45412</link>
      <description>&lt;P&gt;Please run this and post the results:&lt;BR /&gt;
search index=wineventlog* sourcetype=WinEventLog:Application SourceName=Chef &lt;BR /&gt;
| stats values() as by host&lt;BR /&gt;
| rex field=host "(?[^.]+)." &lt;BR /&gt;
| rex field=_raw "(?\d{1,2})\s+hours?\s+ago" &lt;BR /&gt;
| stats count by Time&lt;/P&gt;

&lt;P&gt;The last line will show the different values for Time, and the counts of those. It might be that Time is not defined or doesn't have the values you think it has.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Aug 2019 18:50:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/hellp-with-charting-search-results/m-p/437703#M45412</guid>
      <dc:creator>jpolvino</dc:creator>
      <dc:date>2019-08-09T18:50:04Z</dc:date>
    </item>
    <item>
      <title>Re: hellp with charting search results</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/hellp-with-charting-search-results/m-p/437704#M45413</link>
      <description>&lt;P&gt;hi jpolvino - no results found&lt;/P&gt;

&lt;P&gt;212 events &lt;BR /&gt;
statistics 0&lt;/P&gt;</description>
      <pubDate>Fri, 09 Aug 2019 19:42:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/hellp-with-charting-search-results/m-p/437704#M45413</guid>
      <dc:creator>owie6466</dc:creator>
      <dc:date>2019-08-09T19:42:16Z</dc:date>
    </item>
    <item>
      <title>Re: hellp with charting search results</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/hellp-with-charting-search-results/m-p/437705#M45414</link>
      <description>&lt;P&gt;wait i made a mistake.  running the search again&lt;/P&gt;</description>
      <pubDate>Fri, 09 Aug 2019 19:48:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/hellp-with-charting-search-results/m-p/437705#M45414</guid>
      <dc:creator>owie6466</dc:creator>
      <dc:date>2019-08-09T19:48:16Z</dc:date>
    </item>
    <item>
      <title>Re: hellp with charting search results</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/hellp-with-charting-search-results/m-p/437706#M45415</link>
      <description>&lt;P&gt;okay not showing any for Time&lt;/P&gt;</description>
      <pubDate>Fri, 09 Aug 2019 19:50:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/hellp-with-charting-search-results/m-p/437706#M45415</guid>
      <dc:creator>owie6466</dc:creator>
      <dc:date>2019-08-09T19:50:10Z</dc:date>
    </item>
    <item>
      <title>Re: hellp with charting search results</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/hellp-with-charting-search-results/m-p/437707#M45416</link>
      <description>&lt;P&gt;So Time field is undefined. Is this the line you are using to set Time?&lt;BR /&gt;
| rex field=_raw "(?\d{1,2})\s+hours?\s+ago"&lt;/P&gt;

&lt;P&gt;If so, then change it to:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex field=_raw "(?&amp;lt;Time&amp;gt;\d{1,2})\s+hours?\s+ago"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Also, please explain what Time is supposed to contain. The line right above assumes it is the number of "hours ago" logged.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Aug 2019 19:53:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/hellp-with-charting-search-results/m-p/437707#M45416</guid>
      <dc:creator>jpolvino</dc:creator>
      <dc:date>2019-08-09T19:53:09Z</dc:date>
    </item>
    <item>
      <title>Re: hellp with charting search results</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/hellp-with-charting-search-results/m-p/437708#M45417</link>
      <description>&lt;P&gt;this is a sample of the line:&lt;BR /&gt;
Event&lt;BR /&gt;
0 minutes ago, vmpit-p4cti002.lm.lmig.com, windows 6.3.9600&lt;/P&gt;</description>
      <pubDate>Fri, 09 Aug 2019 20:21:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/hellp-with-charting-search-results/m-p/437708#M45417</guid>
      <dc:creator>owie6466</dc:creator>
      <dc:date>2019-08-09T20:21:22Z</dc:date>
    </item>
  </channel>
</rss>

