<?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 automating the missing forwarder records query in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/automating-the-missing-forwarder-records-query/m-p/76760#M15682</link>
    <description>&lt;P&gt;Newbie to splunk, hello everyone...&lt;/P&gt;

&lt;P&gt;I use the UniversalForwarder on a pool of windows IIS servers.  Each server has 4 unique sites (IP's).  I've had some problems with the universal forwarder ignoring some IIS logfiles, eventually this was fixed by adding both "crcSalt = &lt;SOURCE&gt;" and "alwaysOpenFile = 1" to the inputs.conf on the IIS servers.&lt;/SOURCE&gt;&lt;/P&gt;

&lt;P&gt;In order to validate that this fix is working, I want to automate a check.&lt;/P&gt;

&lt;P&gt;The query "#Fields: | stats values(source) by host" for the last 7 days should return results like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;c:\inetpub\logs\site1\ex20120924.log
c:\inetpub\logs\site1\ex20120925.log
c:\inetpub\logs\site1\ex20120926.log
c:\inetpub\logs\site1\ex20120927.log
c:\inetpub\logs\site1\ex20120928.log
c:\inetpub\logs\site1\ex20120929.log
c:\inetpub\logs\site1\ex20120930.log
c:\inetpub\logs\site2\ex20120924.log
c:\inetpub\logs\site2\ex20120925.log
c:\inetpub\logs\site2\ex20120926.log
c:\inetpub\logs\site2\ex20120927.log
c:\inetpub\logs\site2\ex20120928.log
c:\inetpub\logs\site2\ex20120929.log
c:\inetpub\logs\site2\ex20120930.log
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Above are good results.&lt;/P&gt;

&lt;P&gt;Below are bad results:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;c:\inetpub\logs\site1\ex20120924.log
c:\inetpub\logs\site1\ex20120925.log
&amp;lt;no entry for ex20120926.log&amp;gt;
c:\inetpub\logs\site1\ex20120927.log
c:\inetpub\logs\site1\ex20120928.log
c:\inetpub\logs\site1\ex20120929.log
c:\inetpub\logs\site1\ex20120930.log
c:\inetpub\logs\site2\ex20120924.log
c:\inetpub\logs\site2\ex20120925.log
c:\inetpub\logs\site2\ex20120926.log
c:\inetpub\logs\site2\ex20120927.log
c:\inetpub\logs\site2\ex20120928.log
c:\inetpub\logs\site2\ex20120929.log
&amp;lt;no entry for ex20120930.log&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Above has 2 entries missing.&lt;/P&gt;

&lt;P&gt;In pseudo logic, I would run the query:&lt;BR /&gt;
"#Fields: | stats values(source) by host" for the last 7 days &lt;/P&gt;

&lt;P&gt;through a loop counter that returns an error if each site (site1/site2) fails to return 7 records.&lt;BR /&gt;
If this is too complex, I suppose I could look for "at least XX rows" or such.  Any suggestions would be appreciated.&lt;/P&gt;</description>
    <pubDate>Mon, 01 Oct 2012 21:39:12 GMT</pubDate>
    <dc:creator>umiotoko</dc:creator>
    <dc:date>2012-10-01T21:39:12Z</dc:date>
    <item>
      <title>automating the missing forwarder records query</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/automating-the-missing-forwarder-records-query/m-p/76760#M15682</link>
      <description>&lt;P&gt;Newbie to splunk, hello everyone...&lt;/P&gt;

&lt;P&gt;I use the UniversalForwarder on a pool of windows IIS servers.  Each server has 4 unique sites (IP's).  I've had some problems with the universal forwarder ignoring some IIS logfiles, eventually this was fixed by adding both "crcSalt = &lt;SOURCE&gt;" and "alwaysOpenFile = 1" to the inputs.conf on the IIS servers.&lt;/SOURCE&gt;&lt;/P&gt;

&lt;P&gt;In order to validate that this fix is working, I want to automate a check.&lt;/P&gt;

&lt;P&gt;The query "#Fields: | stats values(source) by host" for the last 7 days should return results like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;c:\inetpub\logs\site1\ex20120924.log
c:\inetpub\logs\site1\ex20120925.log
c:\inetpub\logs\site1\ex20120926.log
c:\inetpub\logs\site1\ex20120927.log
c:\inetpub\logs\site1\ex20120928.log
c:\inetpub\logs\site1\ex20120929.log
c:\inetpub\logs\site1\ex20120930.log
c:\inetpub\logs\site2\ex20120924.log
c:\inetpub\logs\site2\ex20120925.log
c:\inetpub\logs\site2\ex20120926.log
c:\inetpub\logs\site2\ex20120927.log
c:\inetpub\logs\site2\ex20120928.log
c:\inetpub\logs\site2\ex20120929.log
c:\inetpub\logs\site2\ex20120930.log
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Above are good results.&lt;/P&gt;

&lt;P&gt;Below are bad results:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;c:\inetpub\logs\site1\ex20120924.log
c:\inetpub\logs\site1\ex20120925.log
&amp;lt;no entry for ex20120926.log&amp;gt;
c:\inetpub\logs\site1\ex20120927.log
c:\inetpub\logs\site1\ex20120928.log
c:\inetpub\logs\site1\ex20120929.log
c:\inetpub\logs\site1\ex20120930.log
c:\inetpub\logs\site2\ex20120924.log
c:\inetpub\logs\site2\ex20120925.log
c:\inetpub\logs\site2\ex20120926.log
c:\inetpub\logs\site2\ex20120927.log
c:\inetpub\logs\site2\ex20120928.log
c:\inetpub\logs\site2\ex20120929.log
&amp;lt;no entry for ex20120930.log&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Above has 2 entries missing.&lt;/P&gt;

&lt;P&gt;In pseudo logic, I would run the query:&lt;BR /&gt;
"#Fields: | stats values(source) by host" for the last 7 days &lt;/P&gt;

&lt;P&gt;through a loop counter that returns an error if each site (site1/site2) fails to return 7 records.&lt;BR /&gt;
If this is too complex, I suppose I could look for "at least XX rows" or such.  Any suggestions would be appreciated.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Oct 2012 21:39:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/automating-the-missing-forwarder-records-query/m-p/76760#M15682</guid>
      <dc:creator>umiotoko</dc:creator>
      <dc:date>2012-10-01T21:39:12Z</dc:date>
    </item>
    <item>
      <title>Re: automating the missing forwarder records query</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/automating-the-missing-forwarder-records-query/m-p/76761#M15683</link>
      <description>&lt;P&gt;Use the &lt;CODE&gt;stats&lt;/CODE&gt; function &lt;CODE&gt;dc&lt;/CODE&gt; to get a distinct count of the field values, then check if the count is 7. Then create an alert that triggers if 0 results are returned. You could also reverse that logic - check if count is NOT 7 and trigger alert if more than 0 results are returned.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;#Fields: | stats dc(source) as uniquecount by host | where uniquecount!=7
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 01 Oct 2012 21:59:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/automating-the-missing-forwarder-records-query/m-p/76761#M15683</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2012-10-01T21:59:24Z</dc:date>
    </item>
  </channel>
</rss>

