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
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Calling All Security Pros: Ready to Race Through Boston?

Hey Splunkers, .conf25 is heading to Boston and we’re kicking things off with something bold, competitive, and ...

Beyond Detection: How Splunk and Cisco Integrated Security Platforms Transform ...

Financial services organizations face an impossible equation: maintain 99.9% uptime for mission-critical ...

Customer success is front and center at .conf25

Hi Splunkers, If you are not able to be at .conf25 in person, you can still learn about all the latest news ...