Data from nagios.log is lost at log rotation time...

Gareth Hash fyzix at yahoo.com
Thu May 15 16:48:06 CEST 2003


Hello.

I came across a *very* weird problem which seems to be more of a code
issue than a usage issue (although I could be wrong). My initial
hosts and servcies files had options set for each element. For
example, 

# 'novell1' host definition
define host{
        use                     generic-host            ; Name of
host template to use

        host_name               novell1
        alias                   Novell Server #1
        address                 192.168.1.2
        check_command           check-host-alive
        max_check_attempts      10
        notification_interval   120
        notification_period     24x7
        notification_options    d,u,r
        register                0
        }

Each host had an entry like the one above. But then I read the
section on templates in the manual, and thought it would be easier to
have things like check_command, max_check_attempts, etc placed into a
template and have host definitions have only the name, alias and
address for each. The rest would come from the template. 

But when I did that, the logs DISAPPEARED at log rotation time.
nagios.log is wiped for the new day's logs, but the archives file for
the day that just passed is empty. Since this is a critical matter,
any help as soon as possible would be GREATLY appreciated.

I am still receiving email notifications when a service or host goes
down; even though I specfically set notifications_enabled 0.

Here are my current hosts and services files in case something in
there causes the log rotation to mess up :




Hosts file :

# Generic host definition template
define host{
        name                            generic-host    ; Name of
template.

        max_check_attempts              1
        checks_enabled                  0
        flap_detection_enabled          1
        process_perf_data               1
        retain_status_information       1
        retain_nonstatus_information    1
        notification_interval           60
        notification_period             24x7
        notification_options            n
        notifications_enabled           1

        register                        0       ; Template only. Do
not register
        }


define host{ 
        use       generic-host 

        host_name host1
        alias     host1
        address   192.168.x.x
        }
        



Services file :

define service{
        name                            ping

        service_description             PING
        is_volatile                     0
        check_command                  
check_ping!1000.0,75%!2000.0,100%
        max_check_attempts              3
        normal_check_interval           2
        retry_check_interval            1
        active_checks_enabled           1
        passive_checks_enabled          0
        check_period                    24x7
        parallelize_check               1
        check_freshness                 0
        notification_interval           60
        notification_period             24x7
        notification_options            n
        notifications_enabled           1

        flap_detection_enabled          1
        process_perf_data               1
        retain_status_information       1
        retain_nonstatus_information    1

        contact_groups                  dragon-admins

        register                        0    ; Template for ping
service
        }

# Ping service definition
define service{
        use             ping
        host_name       host1, host2, host3, host4
        }


__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com


-------------------------------------------------------
Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara
The only event dedicated to issues related to Linux enterprise solutions
www.enterpriselinuxforum.com




More information about the Developers mailing list