<?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 Include 'Missing Events' In Search Results in Alerting</title>
    <link>https://community.splunk.com/t5/Alerting/Include-Missing-Events-In-Search-Results/m-p/47046#M603</link>
    <description>&lt;P&gt;I've a CSV file which contains two values per row, 'Filter' and 'Timing'. Essentially the Filter will specify a value to search across a series of events either a field value or text in message etc. The Timing value is used in another query. What I'm after is a search query that executes this lookup file against the events and returns a count of matches for each, and more importantly, returns those for which no events where found. My current query (which does not return those with no events) is:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;&lt;BR /&gt;
| inputlookup my_lookup&lt;BR /&gt;
| eval Filter=$Filter$ | map [search source=MySource $Filter$] | stats count by EventName&lt;BR /&gt;
&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;So for a CSV like this:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Filter,Timing&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;
Text found in Event A messages, 100&lt;BR /&gt;&lt;BR /&gt;
Text found in Event B messages, 400&lt;BR /&gt;&lt;BR /&gt;
Text found in Event C messages, 300  &lt;/P&gt;

&lt;P&gt;which returns something like:  &lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;EventName | Count&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;
EventA | 250&lt;BR /&gt;&lt;BR /&gt;
EventB | 175&lt;/P&gt;

&lt;P&gt;when there are matches for the first two rows but none for the second. Ideally what I'd like is:  &lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;EventName | Filter | Count&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;
EventA | Text found in Event A messages | 250&lt;BR /&gt;&lt;BR /&gt;
EventB | Text found in Event B messages | 175&lt;BR /&gt;&lt;BR /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;| Text found in Event C messages | 0&lt;/P&gt;

&lt;P&gt;Can anyone point me in the right direction?&lt;/P&gt;</description>
    <pubDate>Wed, 28 Nov 2012 12:17:11 GMT</pubDate>
    <dc:creator>paddy3883</dc:creator>
    <dc:date>2012-11-28T12:17:11Z</dc:date>
    <item>
      <title>Include 'Missing Events' In Search Results</title>
      <link>https://community.splunk.com/t5/Alerting/Include-Missing-Events-In-Search-Results/m-p/47046#M603</link>
      <description>&lt;P&gt;I've a CSV file which contains two values per row, 'Filter' and 'Timing'. Essentially the Filter will specify a value to search across a series of events either a field value or text in message etc. The Timing value is used in another query. What I'm after is a search query that executes this lookup file against the events and returns a count of matches for each, and more importantly, returns those for which no events where found. My current query (which does not return those with no events) is:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;&lt;BR /&gt;
| inputlookup my_lookup&lt;BR /&gt;
| eval Filter=$Filter$ | map [search source=MySource $Filter$] | stats count by EventName&lt;BR /&gt;
&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;So for a CSV like this:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Filter,Timing&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;
Text found in Event A messages, 100&lt;BR /&gt;&lt;BR /&gt;
Text found in Event B messages, 400&lt;BR /&gt;&lt;BR /&gt;
Text found in Event C messages, 300  &lt;/P&gt;

&lt;P&gt;which returns something like:  &lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;EventName | Count&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;
EventA | 250&lt;BR /&gt;&lt;BR /&gt;
EventB | 175&lt;/P&gt;

&lt;P&gt;when there are matches for the first two rows but none for the second. Ideally what I'd like is:  &lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;EventName | Filter | Count&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;
EventA | Text found in Event A messages | 250&lt;BR /&gt;&lt;BR /&gt;
EventB | Text found in Event B messages | 175&lt;BR /&gt;&lt;BR /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;| Text found in Event C messages | 0&lt;/P&gt;

&lt;P&gt;Can anyone point me in the right direction?&lt;/P&gt;</description>
      <pubDate>Wed, 28 Nov 2012 12:17:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Include-Missing-Events-In-Search-Results/m-p/47046#M603</guid>
      <dc:creator>paddy3883</dc:creator>
      <dc:date>2012-11-28T12:17:11Z</dc:date>
    </item>
    <item>
      <title>Re: Include 'Missing Events' In Search Results</title>
      <link>https://community.splunk.com/t5/Alerting/Include-Missing-Events-In-Search-Results/m-p/47047#M604</link>
      <description>&lt;P&gt;try a combination of fillnull&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/5.0.1/SearchReference/Fillnull"&gt;http://docs.splunk.com/Documentation/Splunk/5.0.1/SearchReference/Fillnull&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;| fillnull value="missing"&lt;/CODE&gt;  &lt;/P&gt;

&lt;P&gt;and an outer  join instead of the lookup &lt;BR /&gt;
see &lt;A href="http://docs.splunk.com/Documentation/Splunk/5.0.1/SearchReference/Join"&gt;http://docs.splunk.com/Documentation/Splunk/5.0.1/SearchReference/Join&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;searchA | join type=outer  Eventname [search searchB]&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Nov 2012 15:29:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Include-Missing-Events-In-Search-Results/m-p/47047#M604</guid>
      <dc:creator>yannK</dc:creator>
      <dc:date>2012-11-28T15:29:51Z</dc:date>
    </item>
  </channel>
</rss>

