Getting Data In

Splunk Stopped Pulling

reverse
Contributor

So here is the issue -

the file (abc.log) which was being pulled into splunk got rolled over.
abc.log became abc.log.1
and a new abc.log got created.the issue was that timestamp of new file(abc.log) didn't change at all for some unknown reasons ..

And ever since that time it stopped pulling .. does this make any sense ?

File will not be read, is too small to match seekptr checksum

Tags (2)
0 Karma

DavidHourani
Super Champion

Hi @reverse,

Try setting initCrcLength, if should the trick. It defaults to 256 in input.conf so change it to 512 and see if it solved your issue.

This is explained here :
https://docs.splunk.com/Documentation/Splunk/latest/Data/Howlogfilerotationishandled

Let me know if that helps.

Cheers,
David

0 Karma

codebuilder
Influencer

My first guess is that you have logrotate configured on the given filesystem, and that it is set to create a new file at the same time that it rotates the existing log file.

Note, the use of logrotate is indicated by the filename in your output (abc.log became abc.log.1).

If this process happens quickly enough, you can potentially get a new log file with a nearly identical timestamp.
Example:

cat /etc/logrotate.d/yum
        /var/log/yum.log {
            missingok
            notifempty
            size 30k
            yearly
            create 0600 root root
        }

Most applications are intuitive enough to create their own log file if it does not exist, so the use of 'create' is generally not necessary.
Try commenting out that line in your logrotate conf file, cycle the daemon, and

     /var/log/yum.log {
         missingok
         notifempty
         size 30k
         yearly
         # create 0600 root root
     }

systemctl restart rsyslog.service
systemctl status rsyslog.service

The above assumes systemd, and always test in a non-prod environment first obviously.

----
An upvote would be appreciated and Accept Solution if it helps!
0 Karma

reverse
Contributor

hey @Vijeta.. hey @jnudell_2 ever faced this issue ?

0 Karma

reverse
Contributor

@martin_mueller .. please guide on this. thanks.

0 Karma

skalliger
Motivator

People will respond to you when they have time. 🙂

What is your issue exactly? After the file is rolled to *.1, the newly created file does not get indexed, correct? Have you checked other threads? There about a dozen threads about this problem, like increasing initCrcLength or setting crcSalt if initCrcLength isn't doing the job alone (which it should).

Skalli

reverse
Contributor

Lets say abc.log has a creation of jan 1 1am .. and it got rolled over ... to abc.log.1

The new abc.log is still having the same create timestamp..

Can this issue alone stop splunk pulling behavior.. are splunk agents timestamp sensitive when it comes to t
Rolling logs ?

0 Karma

skalliger
Motivator

Yes, they are. You probably need to adjust your inputs.conf when you're running into timestamping issues. You can try using crcSalt = <SOURCE> for this.

Skalli

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Announcing Modern Navigation: A New Era of Splunk User Experience

We are excited to introduce the Modern Navigation feature in the Splunk Platform, available to both cloud and ...

Modernize your Splunk Apps – Introducing Python 3.13 in Splunk

We are excited to announce that the upcoming releases of Splunk Enterprise 10.2.x and Splunk Cloud Platform ...

Step into “Hunt the Insider: An Splunk ES Premier Mystery” to catch a cybercriminal ...

After a whole week of being on call, you fell asleep on your keyboard, and you hit a sequence of buttons that ...