instead of doing a restart of rsyslog, send it a HUP, that will close all outputs without it loosing it's place on inputs.

Rsyslog will also create it's output files when the first log arrives for them, so you don't need to have the log rotation create the files.

David Lang

On Tue, 28 Oct 2014, Alex Flex wrote:

Date: Tue, 28 Oct 2014 15:56:04 -0600
From: Alex Flex <[email protected]>
Reply-To: rsyslog-users <[email protected]>
To: [email protected]
Subject: [rsyslog] Hoow to reload the stat file used in imfile openings.

Hello Rsyslog community,

Iam monitoring some log files via imfile, and sending it to a remote location via imudp.

The problem is that internal logrotating done with this line:

/var/log/incoming/*.log {
       weekly
       missingok
       rotate 52
       dateext
       notifempty
       create 640 nginx adm
       sharedscripts
   postrotate
               /etc/init.d/rsyslog restart >/dev/null 2>&1 || true
   endscript
}


This causes later that the rsyslog stat file associated with each log looses its place and Iam in need of manually deleting the /var/lib/rsyslog stat files and then restarting rsyslog.

Is there a more conveniente way to tell rsyslog to do this flush without my having to script this action manually in the postorate of logrotation?

Thanks.

Alex

_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE THAT.

_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of 
sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE 
THAT.

Reply via email to