<?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: For each each host for each eventtype, chart the number of occurences including its respective threshold in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-chart-the-number-of-occurrences-including-its-respective/m-p/596222#M207552</link>
    <description>&lt;LI-CODE lang="markup"&gt;| stats count values(alert_threshold) as alert_threshold by eventtype &lt;/LI-CODE&gt;</description>
    <pubDate>Tue, 03 May 2022 08:13:09 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2022-05-03T08:13:09Z</dc:date>
    <item>
      <title>How to chart the number of occurrences including its respective threshold for each host and each eventtype?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-chart-the-number-of-occurrences-including-its-respective/m-p/596184#M207537</link>
      <description>&lt;P&gt;Hi everybody,&lt;/P&gt;
&lt;P&gt;I have the following problem and cannot seem to be able to wrap my head around it:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;I have a bunch of eventtypes (close to 1000).&lt;/LI&gt;
&lt;LI&gt;Some of those eventtypes have certain thresholds which are greater than zero. I look the values up from a csv&lt;/LI&gt;
&lt;LI&gt;For a single host, I'd like to&lt;BR /&gt;
&lt;OL&gt;
&lt;LI&gt;Chart the number of occurrances for an eventtype IF
&lt;OL&gt;
&lt;LI&gt;That number of occurrances is higher than the aforementioned threshold&lt;/LI&gt;
&lt;LI&gt;The chart shall also contain a static line depicting the threshold value&lt;/LI&gt;
&lt;/OL&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;Here is what I have so far. I believe I am always getting lost when using an aggregate function such as count() because added something to the result using eval just wont work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;index="my_index" eventtype=* host="$HOST_FROM_DROPDOWN$"  
| lookup my-events eventtype 
| eventstats count by eventtype 
| where alert_threshold &amp;gt; 0 AND count &amp;gt; alert_threshold
| stats count by eventtype 
| eval Threshold = alert_threshold&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;What I do understand is that I have to add the "Threshold" variable in the overlay Options of the chart.&lt;/P&gt;
&lt;P&gt;Any help is much appreciated. Thank you&lt;/P&gt;</description>
      <pubDate>Tue, 03 May 2022 15:59:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-chart-the-number-of-occurrences-including-its-respective/m-p/596184#M207537</guid>
      <dc:creator>zapping575</dc:creator>
      <dc:date>2022-05-03T15:59:44Z</dc:date>
    </item>
    <item>
      <title>Re: For each each host for each eventtype, chart the number of occurences including its respective threshold</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-chart-the-number-of-occurrences-including-its-respective/m-p/596222#M207552</link>
      <description>&lt;LI-CODE lang="markup"&gt;| stats count values(alert_threshold) as alert_threshold by eventtype &lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 03 May 2022 08:13:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-chart-the-number-of-occurrences-including-its-respective/m-p/596222#M207552</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-05-03T08:13:09Z</dc:date>
    </item>
    <item>
      <title>Re: For each each host for each eventtype, chart the number of occurences including its respective threshold</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-chart-the-number-of-occurrences-including-its-respective/m-p/596233#M207559</link>
      <description>&lt;P&gt;Thank you very much. I got it working as expected like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="my_index" eventtype=* host="dropdown_value..."  
| lookup my_lookup eventtype 
| stats count values(alert_threshold) as alert_threshold by eventtype 
| where alert_threshold &amp;gt; 0 AND count &amp;gt; alert_threshold
| sort count desc&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now the only thing left is that the threshold value is drawn as a dot in the chart. I'd like it to be a line going across the entire bar. Is that possible?&lt;/P&gt;</description>
      <pubDate>Tue, 03 May 2022 09:56:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-chart-the-number-of-occurrences-including-its-respective/m-p/596233#M207559</guid>
      <dc:creator>zapping575</dc:creator>
      <dc:date>2022-05-03T09:56:42Z</dc:date>
    </item>
    <item>
      <title>Re: For each each host for each eventtype, chart the number of occurences including its respective threshold</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-chart-the-number-of-occurrences-including-its-respective/m-p/596236#M207560</link>
      <description>&lt;P&gt;You will get a dot if there is only 1 point on the line e.g. only one event type breaches the threshold&lt;/P&gt;</description>
      <pubDate>Tue, 03 May 2022 10:14:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-chart-the-number-of-occurrences-including-its-respective/m-p/596236#M207560</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-05-03T10:14:34Z</dc:date>
    </item>
    <item>
      <title>Re: For each each host for each eventtype, chart the number of occurences including its respective threshold</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-chart-the-number-of-occurrences-including-its-respective/m-p/596265#M207569</link>
      <description>&lt;P&gt;Acknowledged. thanks&lt;/P&gt;</description>
      <pubDate>Tue, 03 May 2022 14:23:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-chart-the-number-of-occurrences-including-its-respective/m-p/596265#M207569</guid>
      <dc:creator>zapping575</dc:creator>
      <dc:date>2022-05-03T14:23:00Z</dc:date>
    </item>
  </channel>
</rss>

