How do nagios logs rotate

Marc Powell marc at ena.com
Thu Apr 14 03:55:10 CEST 2005



> -----Original Message-----
> From: nagios-users-admin at lists.sourceforge.net [mailto:nagios-users-
> admin at lists.sourceforge.net] On Behalf Of scott_yem at agilent.com
> Sent: Wednesday, April 13, 2005 8:14 PM
> To: nagios-users at lists.sourceforge.net
> Subject: RE: [Nagios-users] How do nagios logs rotate
> 
> I think I was just too vague.  I know how and where the logs are
defined
> to rotate, what I am looking for is the command they use so I can
append a
> function to HUP my process reading the tail of the file.  I have
> configured Nagios on Redhat 7.3, Fedora Core 2 & 3, RHEL WS 3 and
Debian
> Woody and Sarge with Netsaint 0.0.7, Nagios 1.2, 1.3(Debian), 2.0a1,
> 2.0b2, and 2.0b3.  I am currently working on 2.0b3 on RHEL WS 3.
Although
> I like 1.3 on Debian Sarge, I think the newer version is better for my
> purposes.  I have not seen any logging information regarding how the
logs
> are rotated, but I believe that they are using logrotate.  If this is
the

Nagios handles all of the log rotations internally by the nagios daemon
itself. No outside programs such as logrotate are used. See
base/logging.c if you're interested.


> I guess another option would be to set the log rotation to none and
use
> the logrotate function, but I think this will have adverse affects to
the
> statistics.  Please help.

You are correct. External manipulation of the log files outside of the
rotation times that nagios is designed for would likely be problematic.
I've experienced problems switching from one rotation period to another,
day to week for example.

--
Marc


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list