<?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: Alert on Count and print a table in Alerting</title>
    <link>https://community.splunk.com/t5/Alerting/Alert-on-Count-and-print-a-table/m-p/316333#M10959</link>
    <description>&lt;P&gt;Hi Mayur, thanks for your answer, but using this query the fnal output table will be based on count per host so if for eg- host1 has count 11 and host2 has count 2 it will show only the host with count 11, which may lead to misinterpretation of the alert as the alert condition is when total number of errors overall on all the hosts is greater than 10.&lt;/P&gt;</description>
    <pubDate>Wed, 17 Jan 2018 03:40:40 GMT</pubDate>
    <dc:creator>varunghai</dc:creator>
    <dc:date>2018-01-17T03:40:40Z</dc:date>
    <item>
      <title>Alert on Count and print a table</title>
      <link>https://community.splunk.com/t5/Alerting/Alert-on-Count-and-print-a-table/m-p/316331#M10957</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I want to create an alert where, I want to raise an alert if the count of total number of errors is greater than 10, then i want to print a table with error count on each host.&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Query&lt;/STRONG&gt; - &lt;BR /&gt;
index=weblogs host="nlhypsewb*.*" sourcetype=web "The timeout specified has expired" earliest=-15m&lt;BR /&gt;
| stats count(host) as COUNT &lt;BR /&gt;
| where COUNT &amp;gt; 4&lt;/P&gt;

&lt;P&gt;This query gives me correct results but it only gives me a column with total count&lt;BR /&gt;
But when this query is giving some results then i want to generate an email which shows the count of errors on each host. How do I add those details in this query without using a Case if possible? I want to know if there is another option apart from using a switch Case.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 17:43:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Alert-on-Count-and-print-a-table/m-p/316331#M10957</guid>
      <dc:creator>varunghai</dc:creator>
      <dc:date>2020-09-29T17:43:37Z</dc:date>
    </item>
    <item>
      <title>Re: Alert on Count and print a table</title>
      <link>https://community.splunk.com/t5/Alerting/Alert-on-Count-and-print-a-table/m-p/316332#M10958</link>
      <description>&lt;P&gt;hey you can try something like this &lt;BR /&gt;
If you want to see error count on each host then you should write&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=weblogs host="nlhypsewb*.*" sourcetype=web "The timeout specified has expired" earliest=-15m 
| stats count(host) as COUNT by host 
| eventstats sum(COUNT) as total_count | where total_count&amp;gt;10 | fields - total_count
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;let me know if this helps!&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jan 2018 10:19:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Alert-on-Count-and-print-a-table/m-p/316332#M10958</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2018-01-16T10:19:11Z</dc:date>
    </item>
    <item>
      <title>Re: Alert on Count and print a table</title>
      <link>https://community.splunk.com/t5/Alerting/Alert-on-Count-and-print-a-table/m-p/316333#M10959</link>
      <description>&lt;P&gt;Hi Mayur, thanks for your answer, but using this query the fnal output table will be based on count per host so if for eg- host1 has count 11 and host2 has count 2 it will show only the host with count 11, which may lead to misinterpretation of the alert as the alert condition is when total number of errors overall on all the hosts is greater than 10.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2018 03:40:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Alert-on-Count-and-print-a-table/m-p/316333#M10959</guid>
      <dc:creator>varunghai</dc:creator>
      <dc:date>2018-01-17T03:40:40Z</dc:date>
    </item>
    <item>
      <title>Re: Alert on Count and print a table</title>
      <link>https://community.splunk.com/t5/Alerting/Alert-on-Count-and-print-a-table/m-p/316334#M10960</link>
      <description>&lt;P&gt;Hey yeah i got it. I have changed my query pls check and let me know.. i have set the threshold on the total number of count !&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2018 03:54:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Alert-on-Count-and-print-a-table/m-p/316334#M10960</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2018-01-17T03:54:28Z</dc:date>
    </item>
  </channel>
</rss>

