Re: [Nagios-users] Log rotation with Logrotate
Hi, let me come back to a very old issue regarding log rotation of Nagios. On Wed, Oct 31, 2007 at 03:10:36PM +0100, Andreas Ericsson wrote: > Marc Haber wrote: > >Packaging Nagios for Debian means doing things in a way that users > >might expect them to be done to avoid confusion. > > Nagios users' confusion, or Debian users' confusion? Debian users' confusion. Nagios folks will probably compile their own Nagios anyway. > Apart from that, you'll have to make sure that the nagios.cfg file > is kept in sync with the logrotate config somehow, since the cgi's > do some clever things that requires them to know when the logs are > rotated. AFAIK, logrotate can't make logfiles with the names expected > by the CGI's, so unless you have another gui to use with Nagios, I'd > really recommend you either patch the cgi's (extensively) or don't > fiddle with it. Nagios' log files are kind of unique in a way. Usually, log files are written to and then never touched again. So, basically, the local admin is free to do like he sees fit with them once they were written. Slowly realizing that Nagios' "log" files are - of course - processed by the CGIs for the history functions, I begin to question myself whether /var/log is the right place for the log files and that they should probably really be in /var/lib as they are "variable state information". > >One of these expected > >things is that logs are rotated using logrotate, which allows people > >to specify, for example, how many log generations are to be held. > > Historical monitoring data can be of great value and should, basically, > never be rotated out. I agree that the defaults for removing the files should be quite high, but since disk space is finite there should be an easy option to remove old files automatically after configuration. > All in all, it's probably not worth bothering with, as you'll break > more things than you'll fix. Given the special role of Nagios log files, agreed. Greetings Marc -- - Marc Haber | "I don't trust Computers. They | Mailadresse im Header Mannheim, Germany | lose things."Winona Ryder | Fon: *49 621 72739834 Nordisch by Nature | How to make an American Quilt | Fax: *49 3221 2323190 - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Nagios-users mailing list Nagios-users@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
Re: [Nagios-users] Log rotation with Logrotate
Marc Haber wrote: > Hi, > > Packaging Nagios for Debian means doing things in a way that users > might expect them to be done to avoid confusion. Nagios users' confusion, or Debian users' confusion? The Nagios users will ofcourse expect Nagios to rotate its own logs, while Debian folks with no clue of Nagios will (most likely) expect logrotate to do it for them. Nagios is a state machine. It reacts on state switches. It can load state from files, but doing so is obviously less optimal than just keeping them in memory. For large to huge networks, loading them from file may not be an option. Apart from that, you'll have to make sure that the nagios.cfg file is kept in sync with the logrotate config somehow, since the cgi's do some clever things that requires them to know when the logs are rotated. AFAIK, logrotate can't make logfiles with the names expected by the CGI's, so unless you have another gui to use with Nagios, I'd really recommend you either patch the cgi's (extensively) or don't fiddle with it. > One of these expected > things is that logs are rotated using logrotate, which allows people > to specify, for example, how many log generations are to be held. > Historical monitoring data can be of great value and should, basically, never be rotated out. > Unfortunately, to do so, we need to disable nagios' built-in log > rotation or we get double rotated logs. > > Is it possible to tell nagios not to rotate the logs? Not that I know of, no. > How will nagios > react when logrotate moves the log file away? > Try and find out? All in all, it's probably not worth bothering with, as you'll break more things than you'll fix. -- Andreas Ericsson [EMAIL PROTECTED] OP5 AB www.op5.se Tel: +46 8-230225 Fax: +46 8-230231 - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ ___ Nagios-users mailing list Nagios-users@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
Re: [Nagios-users] Log rotation with Logrotate
On Wed, 31 Oct 2007, Marc Haber wrote: > Is it possible to tell nagios not to rotate the logs? How will nagios > react when logrotate moves the log file away? log_rotation_method=n According to http://nagios.sourceforge.net/docs/2_0/configmain.html#log_rotation_method "n" (none) is the default - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ ___ Nagios-users mailing list Nagios-users@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
[Nagios-users] Log rotation with Logrotate
Hi, Packaging Nagios for Debian means doing things in a way that users might expect them to be done to avoid confusion. One of these expected things is that logs are rotated using logrotate, which allows people to specify, for example, how many log generations are to be held. Unfortunately, to do so, we need to disable nagios' built-in log rotation or we get double rotated logs. Is it possible to tell nagios not to rotate the logs? How will nagios react when logrotate moves the log file away? Greetings Marc -- - Marc Haber | "I don't trust Computers. They | Mailadresse im Header Mannheim, Germany | lose things."Winona Ryder | Fon: *49 621 72739834 Nordisch by Nature | How to make an American Quilt | Fax: *49 3221 2323190 - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ ___ Nagios-users mailing list Nagios-users@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