<?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: Fire an alert when count of a particular value in one column is greater than something in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Fire-an-alert-when-count-of-a-particular-value-in-one-column-is/m-p/221206#M65015</link>
    <description>&lt;P&gt;You should be able by triggering results only once instead of by result and also including an inline table in your email.&lt;/P&gt;

&lt;P&gt;See pictures below and hope that helps.&lt;/P&gt;

&lt;P&gt;&lt;IMG src="https://s10.postimg.org/ltzz4u6p5/Screen_Shot_2016_08_11_at_10_55_35.png" alt="alt text" /&gt;&lt;/P&gt;

&lt;P&gt;&lt;IMG src="https://s9.postimg.org/7eweblan3/Screen_Shot_2016_08_11_at_10_55_01.png" alt="alt text" /&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 11 Aug 2016 09:59:25 GMT</pubDate>
    <dc:creator>javiergn</dc:creator>
    <dc:date>2016-08-11T09:59:25Z</dc:date>
    <item>
      <title>Fire an alert when count of a particular value in one column is greater than something</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Fire-an-alert-when-count-of-a-particular-value-in-one-column-is/m-p/221203#M65012</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;
I have a query like so:&lt;BR /&gt;
source=“some-source.log” MySearchQuery | stats count by user, host_name&lt;/P&gt;

&lt;P&gt;which produces results like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;user         host_name      count
user1        host_name1      5
user2        host_name2      6
user1        host_name3      9
user3        host_name1      3
user3        host_name3      4 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;My question is: how can I write a query to fire an alert when the &lt;STRONG&gt;&lt;EM&gt;sum of count&lt;/EM&gt;&lt;/STRONG&gt; for any user in the above table is greater than 10, e.g user1 here.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Aug 2016 06:56:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Fire-an-alert-when-count-of-a-particular-value-in-one-column-is/m-p/221203#M65012</guid>
      <dc:creator>Vettori</dc:creator>
      <dc:date>2016-08-10T06:56:19Z</dc:date>
    </item>
    <item>
      <title>Re: Fire an alert when count of a particular value in one column is greater than something</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Fire-an-alert-when-count-of-a-particular-value-in-one-column-is/m-p/221204#M65013</link>
      <description>&lt;P&gt;Option 1:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source=“some-source.log” MySearchQuery 
| stats count by user, host_name
| eventstats sum(count) as total_user by user
| where total_user &amp;gt; 10
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Then click on save as &amp;gt; alert&lt;/P&gt;

&lt;P&gt;Option 2:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source=“some-source.log” MySearchQuery 
| stats count by user, host_name
| stats sum(count) as total_user, values(host_name) as host_name by user
| where total_user &amp;gt; 10
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Then click on save as &amp;gt; alert&lt;/P&gt;

&lt;P&gt;Hope that helps.&lt;/P&gt;

&lt;P&gt;Regards,&lt;BR /&gt;
J&lt;/P&gt;</description>
      <pubDate>Wed, 10 Aug 2016 13:53:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Fire-an-alert-when-count-of-a-particular-value-in-one-column-is/m-p/221204#M65013</guid>
      <dc:creator>javiergn</dc:creator>
      <dc:date>2016-08-10T13:53:10Z</dc:date>
    </item>
    <item>
      <title>Re: Fire an alert when count of a particular value in one column is greater than something</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Fire-an-alert-when-count-of-a-particular-value-in-one-column-is/m-p/221205#M65014</link>
      <description>&lt;P&gt;Thanks, accepted the answer. Just another question related to the table in question. Is there a way to attach all of the users' list in the email? Currently, I am using $result.user$ which only picks up the first user.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Aug 2016 08:59:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Fire-an-alert-when-count-of-a-particular-value-in-one-column-is/m-p/221205#M65014</guid>
      <dc:creator>Vettori</dc:creator>
      <dc:date>2016-08-11T08:59:31Z</dc:date>
    </item>
    <item>
      <title>Re: Fire an alert when count of a particular value in one column is greater than something</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Fire-an-alert-when-count-of-a-particular-value-in-one-column-is/m-p/221206#M65015</link>
      <description>&lt;P&gt;You should be able by triggering results only once instead of by result and also including an inline table in your email.&lt;/P&gt;

&lt;P&gt;See pictures below and hope that helps.&lt;/P&gt;

&lt;P&gt;&lt;IMG src="https://s10.postimg.org/ltzz4u6p5/Screen_Shot_2016_08_11_at_10_55_35.png" alt="alt text" /&gt;&lt;/P&gt;

&lt;P&gt;&lt;IMG src="https://s9.postimg.org/7eweblan3/Screen_Shot_2016_08_11_at_10_55_01.png" alt="alt text" /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Aug 2016 09:59:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Fire-an-alert-when-count-of-a-particular-value-in-one-column-is/m-p/221206#M65015</guid>
      <dc:creator>javiergn</dc:creator>
      <dc:date>2016-08-11T09:59:25Z</dc:date>
    </item>
    <item>
      <title>Re: Fire an alert when count of a particular value in one column is greater than something</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Fire-an-alert-when-count-of-a-particular-value-in-one-column-is/m-p/221207#M65016</link>
      <description>&lt;P&gt;Works so well. Thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Aug 2016 11:03:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Fire-an-alert-when-count-of-a-particular-value-in-one-column-is/m-p/221207#M65016</guid>
      <dc:creator>Vettori</dc:creator>
      <dc:date>2016-08-11T11:03:03Z</dc:date>
    </item>
  </channel>
</rss>

