<?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 access.log indexed multiple time in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/access-log-indexed-multiple-time/m-p/198063#M57254</link>
    <description>&lt;P&gt;Splunk is monitoring access log file using the stanza below  &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor:///opt/logging/prodops_httpd]
blacklist = (\.snapshot|\.gz$)
disabled = 0
followTail = 0
host_regex = /opt/logging/prodops_httpd/(.*)/.*\.log
whitelist = (access|error)\.log$
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The log files are rotated every night using the logrotae script like below&lt;BR /&gt;
/etc/logrotate.d/httpd:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;/etc/httpd/logs/*log {
missingok
notifempty
sharedscripts
postrotate
/sbin/service httpd reload &amp;gt; /dev/null 2&amp;gt;/dev/null || true
/usr/local/bin/httpdlogrotate.sh
endscript
}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;/usr/local/bin/httpdlogrotate.sh:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;#!/bin/bash

LOGDIR=/etc/httpd/logs
LogDate=$(date +%Y-%m-%d)

for i in $(find $LOGDIR -name "*log.1")
do
FILENAME=$(echo $i|awk -F \/ '{print $NF}' | sed 's/\.1$//') mv $i $LOGDIR/archive/$FILENAME.$LogDate
gzip $LOGDIR/archive/$FILENAME.$LogDate
done

find $LOGDIR/archive/ -type f -name "*gz" -ctime +4 -exec /bin/rm {} \;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Intermittently log file are indexed multiple times.&lt;/P&gt;</description>
    <pubDate>Sun, 23 Mar 2014 23:43:36 GMT</pubDate>
    <dc:creator>rbal_splunk</dc:creator>
    <dc:date>2014-03-23T23:43:36Z</dc:date>
    <item>
      <title>access.log indexed multiple time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/access-log-indexed-multiple-time/m-p/198063#M57254</link>
      <description>&lt;P&gt;Splunk is monitoring access log file using the stanza below  &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor:///opt/logging/prodops_httpd]
blacklist = (\.snapshot|\.gz$)
disabled = 0
followTail = 0
host_regex = /opt/logging/prodops_httpd/(.*)/.*\.log
whitelist = (access|error)\.log$
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The log files are rotated every night using the logrotae script like below&lt;BR /&gt;
/etc/logrotate.d/httpd:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;/etc/httpd/logs/*log {
missingok
notifempty
sharedscripts
postrotate
/sbin/service httpd reload &amp;gt; /dev/null 2&amp;gt;/dev/null || true
/usr/local/bin/httpdlogrotate.sh
endscript
}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;/usr/local/bin/httpdlogrotate.sh:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;#!/bin/bash

LOGDIR=/etc/httpd/logs
LogDate=$(date +%Y-%m-%d)

for i in $(find $LOGDIR -name "*log.1")
do
FILENAME=$(echo $i|awk -F \/ '{print $NF}' | sed 's/\.1$//') mv $i $LOGDIR/archive/$FILENAME.$LogDate
gzip $LOGDIR/archive/$FILENAME.$LogDate
done

find $LOGDIR/archive/ -type f -name "*gz" -ctime +4 -exec /bin/rm {} \;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Intermittently log file are indexed multiple times.&lt;/P&gt;</description>
      <pubDate>Sun, 23 Mar 2014 23:43:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/access-log-indexed-multiple-time/m-p/198063#M57254</guid>
      <dc:creator>rbal_splunk</dc:creator>
      <dc:date>2014-03-23T23:43:36Z</dc:date>
    </item>
    <item>
      <title>Re: access.log indexed multiple time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/access-log-indexed-multiple-time/m-p/198064#M57255</link>
      <description>&lt;P&gt;The splunkd.log file shows error messages like below&lt;/P&gt;

&lt;P&gt;02-25-2014 09:42:29.085 -0500 WARN TailingProcessor - Access error while handling path: Failed to get file size from prevFd for fstate where file='/opt/logging/prodops_httpd/ny-web-02.na.rtdom.net/access.log' &lt;/P&gt;

&lt;P&gt;The above error messages indicate that Splunk  tried to 'fstat' a file and it failed. Which means, Splunk  opened a file, and it is  still open, and now it can't find out how big it is. That's not normal. &lt;/P&gt;

&lt;P&gt;You would tend to expect this represents a platform-level problem, like an NFS problem or a file system corruption problem or a kernel bug.  For the NFS , we do not  recommend softmount.&lt;/P&gt;

&lt;P&gt;Issue got resolved upon install of new index.&lt;/P&gt;</description>
      <pubDate>Sun, 23 Mar 2014 23:49:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/access-log-indexed-multiple-time/m-p/198064#M57255</guid>
      <dc:creator>rbal_splunk</dc:creator>
      <dc:date>2014-03-23T23:49:42Z</dc:date>
    </item>
  </channel>
</rss>

