Log rotates several times in a row, replacing old log files

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
pengi
Posts: 1
Joined: Fri Sep 27, 2013 6:23 pm

Log rotates several times in a row, replacing old log files

Post by pengi »

The nagios event scheduler can fire off events somewhat early (up to 100ms), if an fd is touched during that time, to save some sleeps. This isn't generally a problem, with exception of log handling. But it doesn't save that much either.

We have a patch that removes those early timeouts, and makes an event guaranteed to fire of first when the event should be triggered:
http://git.op5.org/git/?p=op5-monitor-c ... eefe39fbb0

And then, in the case, by some magic, an event is fired of early, this patch makes the log file not beeing overwritten, but appended .1, .2, .3 and so on:
http://git.op5.org/git/?p=op5-monitor-c ... 83ec8fd2a6
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Log rotates several times in a row, replacing old log fi

Post by scottwilkerson »

This should be resolved in 4.0.2rc1

http://support.nagios.com/forum/viewtop ... 34&t=22098
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked