comportamento de notificação Icinga

1

As notificações que estou recebendo e não recebendo de Icinga não parecem estar fazendo sentido e espero que alguém aqui possa me ajudar. É Icinga 1.10.1 rodando no Ubuntu 12.04.3 LTS

Quando o host se move de cima para baixo, ele o verifica 5 vezes e depois passa para um estado difícil. O log mostra que o processo de notificação do host é acionado e tenta enviar um email por notificar-host-por-email. Mas nada nunca vem.

Os serviços de ping, uptime e uplink se movem para estados críticos e desconhecidos imediatamente e não acionam o evento notify-service-by-mail.

Se o serviço de uplink tiver um link removido, ele passará para um estado de aviso, verificará 5 vezes e, em seguida, enviará um e-mail de notificação com êxito.

Espero que não seja algo óbvio que eu tenha perdido.

Meu serviço genérico, host & os modelos de contato estão abaixo, assim como as definições de host e serviço para o dispositivo em questão.

# generic service template definition
define service{
    name                            generic-service ; The 'name' of this service template
    active_checks_enabled           1       ; Active service checks are enabled
    passive_checks_enabled          1       ; Passive service checks are enabled/accepted
    parallelize_check               1       ; Active service checks should be parallelized (disabling this can lead to major performance problems)
    obsess_over_service             1       ; We should obsess over this service (if necessary)
    check_freshness                 0       ; Default is to NOT check service 'freshness'
    notifications_enabled           1       ; Service notifications are enabled
    event_handler_enabled           1       ; Service event handler is enabled
    flap_detection_enabled          1       ; Flap detection is enabled
    failure_prediction_enabled      1       ; Failure prediction is enabled
    process_perf_data               1       ; Process performance data
    retain_status_information       1       ; Retain status information across program restarts
    retain_nonstatus_information    1       ; Retain non-status information across program restarts
    max_check_attempts              5
    check_interval                  1
    retry_interval                  1
    check_period                    24x7
    notification_interval           30
    notification_period             24x7
    notification_options            w,u,c,r
    contact_groups                  sys-admins
    register                        0       ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL SERVICE, JUST A TEMPLATE!
    }

#service definitions in localhost_icinga.cfg

#check uptime 

define service{
use                     generic-service
host_name               1.switch.foo.com
service_description     Uptime Test
check_command           check_snmp!public!sysUpTime.0
}

#check ping for AS5 for test notifications
define service{
use                     generic-service
host_name               1.switch.foo.com
service_description     Ping Test
check_command           check_ping!200.0,20%!600.0,60%
}

define service{
    use                     generic-service
    host_name               1.switch.foo.com
    service_description     Uplink Ports Check
    check_command           check_multi_snmp!/etc/icinga/objects/switches/1s_uplink.cmd!15
}

.

# Generic host definition template - This is NOT a real host, just a template!

define host{
    name                            generic-host    ; The name of this host template
    notifications_enabled           1       ; Host notifications are enabled
    event_handler_enabled           1       ; Host event handler is enabled
    flap_detection_enabled          1       ; Flap detection is enabled
    failure_prediction_enabled      1       ; Failure prediction is enabled
    process_perf_data               1       ; Process performance data
    retain_status_information       1       ; Retain status information across program    restarts
    retain_nonstatus_information    1       ; Retain non-status information across  program restarts
            check_command                   check-host-alive
            check_interval                  1
            retry_interval                  1
            max_check_attempts              5
            check_period                    24x7
            contact_groups                  sys-admins
            notification_interval           30
            notification_period             24x7
            notification_options            d,u,r
    register                        0       ; DONT REGISTER THIS DEFINITION - ITS NOT A  REAL HOST, JUST A TEMPLATE!
    }

# Define a template for switches that we can reuse
define host{
   name         generic-switch   ; The name of this host template
   use          generic-host   ; Inherit default values from the generic-host template
   register     0      ; DONT REGISTER THIS - ITS JUST A TEMPLATE
   }

#Host definition in localhost_icinga.cfg

define host{
    use             generic-switch      ; Inherit default values from a template
    host_name       1.switch.foo.com      ; The name we're giving to this switch
    alias           S1 - HP Pro-Curve 1800-24G J9028B   ; A longer name associated with the switch
    address         10.1.1.242       ; IP address of the switch
    hostgroups      switches      ; Host groups this switch is associated with
}

.

#Define a generic contact for Icinga

define contact{
    name                            generic-contact
    service_notification_period     24x7
    host_notification_period        24x7
    service_notification_options    w,u,c,r,f,s
    host_notification_options       d,u,r,f,s
    service_notification_commands   notify-service-by-email
    host_notification_commands      notify-host-by-email
    register                        0
    }

#icinga_contacts.cfg
define contact{
    contact_name                    bob
    use                             generic-contact
    alias                           bob (Sysadmin)
    email                           [email protected]
    }

define contactgroup{
    contactgroup_name          sys-admins
    alias                      System Administrator
    members                    bob
}
    
por Stanzor 20.01.2014 / 03:45

0 respostas