[Nagios-users] Log rotation with Logrotate

2007-10-31 Thread Marc Haber
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


Re: [Nagios-users] Log rotation with Logrotate

2007-10-31 Thread Jeremy C. Reed
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


Re: [Nagios-users] Log rotation with Logrotate

2007-10-31 Thread Andreas Ericsson
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