<?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: Email Alert With Sub-Searches, Comparing Sub-Search Results in Alerting</title>
    <link>https://community.splunk.com/t5/Alerting/Email-Alert-With-Sub-Searches-Comparing-Sub-Search-Results/m-p/315363#M10716</link>
    <description>&lt;P&gt;Thanks!  &lt;CODE&gt;filldown&lt;/CODE&gt; is a new one for me.&lt;/P&gt;</description>
    <pubDate>Tue, 18 Jul 2017 14:18:16 GMT</pubDate>
    <dc:creator>torndorff</dc:creator>
    <dc:date>2017-07-18T14:18:16Z</dc:date>
    <item>
      <title>Email Alert With Sub-Searches, Comparing Sub-Search Results</title>
      <link>https://community.splunk.com/t5/Alerting/Email-Alert-With-Sub-Searches-Comparing-Sub-Search-Results/m-p/315361#M10714</link>
      <description>&lt;P&gt;I’m attempting to write an alert that fetches full event data while also comparing the counts of 2 other searches.  The idea being that if C1 is greater than or equal to C2, an alert is fired with an email alert action, attaching the events so that business users can receive check it from their phone.&lt;/P&gt;

&lt;P&gt;This is the best I could come up with but it doesnt work.  Anyone out there able to lend a hand?&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;index=main loglevel=ERROR   | stats&lt;BR /&gt;
count by _raw  | appendcols &lt;BR /&gt;
    [ search index=main loglevel=WARN &lt;BR /&gt;
    | stats count(convId) AS C1 ]  | appendcols &lt;BR /&gt;
    [ search index=main loglevel=ERROR&lt;BR /&gt;
    | stats count(convId) AS C2] &lt;BR /&gt;
    | where C1 &amp;gt;= C2&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Tue, 18 Jul 2017 13:34:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Email-Alert-With-Sub-Searches-Comparing-Sub-Search-Results/m-p/315361#M10714</guid>
      <dc:creator>torndorff</dc:creator>
      <dc:date>2017-07-18T13:34:51Z</dc:date>
    </item>
    <item>
      <title>Re: Email Alert With Sub-Searches, Comparing Sub-Search Results</title>
      <link>https://community.splunk.com/t5/Alerting/Email-Alert-With-Sub-Searches-Comparing-Sub-Search-Results/m-p/315362#M10715</link>
      <description>&lt;P&gt;Just add &lt;CODE&gt;| filldown C1 C2&lt;/CODE&gt; before the &lt;CODE&gt;where&lt;/CODE&gt; clause; this worked for me:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_* | stats count BY sourcetype 
| appendcols 
    [| makeresults 
    | eval C1=30 | table C1] 
| appendcols 
    [| makeresults 
    | eval C2=20 | table C2]
| filldown C1 C2
| where C1&amp;gt;=C2
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 18 Jul 2017 14:07:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Email-Alert-With-Sub-Searches-Comparing-Sub-Search-Results/m-p/315362#M10715</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-07-18T14:07:49Z</dc:date>
    </item>
    <item>
      <title>Re: Email Alert With Sub-Searches, Comparing Sub-Search Results</title>
      <link>https://community.splunk.com/t5/Alerting/Email-Alert-With-Sub-Searches-Comparing-Sub-Search-Results/m-p/315363#M10716</link>
      <description>&lt;P&gt;Thanks!  &lt;CODE&gt;filldown&lt;/CODE&gt; is a new one for me.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jul 2017 14:18:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Email-Alert-With-Sub-Searches-Comparing-Sub-Search-Results/m-p/315363#M10716</guid>
      <dc:creator>torndorff</dc:creator>
      <dc:date>2017-07-18T14:18:16Z</dc:date>
    </item>
  </channel>
</rss>

