Bonjour à tous,
J'ai un soucis d'envoi de notification par mail depuis 3semaines.
J'utilise la commande de notification par défaut qui est constitué comme suit:
usr/bin/mail "%b" "***** Oreon Notification *****\n\nType:$NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\nDate/Time: $DATE$" | /usr/bin/mail -s "Host $HOSTSTATE$ alert for $HOSTNAME$!" $CONTACTEMAIL$
J'ai testé cette commande sur un shell avec l'utilisateur nagios et le mail a été envoyé correctement.
Donc aucun soucis au niveau de mon relai smtp.
Voici un exemple de configuration d'un service down :
define service{
hostgroup_name switches, Hubs, router
service_description ping
is_volatile 1
check_command check_host_alive
max_check_attempts 3
normal_check_interval 60
retry_check_interval 60
active_checks_enabled 0
passive_checks_enabled 1
check_period 24x7
event_handler_enabled 1
notification_interval 60
notification_period 24x7
notification_options w,u,c
notifications_enabled 1
contact_groups Cellule_Reseau
stalking_options o,w,u,c
}
Voici la conf d'un hote du groupe switch:
define host{
host_name SWTEST4
alias Switch test HP
address 10.163.129.64
parents SWTEST1
hostgroups switches
check_command check_host_alive
max_check_attempts 3
active_checks_enabled 0
passive_checks_enabled 1
check_period 24x7
event_handler_enabled 1
contact_groups Cellule_Reseau
notification_interval 60
notification_period 24x7
notification_options d,u,r
notifications_enabled 1
stalking_options o,d,u
}
De plus aucun mail n'apparait dans mon log mail.info (j'utilise postfix comme relai)
Je pense que le soucis est au niveau des droits de l'interface oreon sur l'user nagios mais peut être que l'erreur est tout autre.
Je ne sais pas trop comment vérifier mon idée.
Merci d'avance pour votre aide
J'ai un soucis d'envoi de notification par mail depuis 3semaines.
J'utilise la commande de notification par défaut qui est constitué comme suit:
usr/bin/mail "%b" "***** Oreon Notification *****\n\nType:$NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\nDate/Time: $DATE$" | /usr/bin/mail -s "Host $HOSTSTATE$ alert for $HOSTNAME$!" $CONTACTEMAIL$
J'ai testé cette commande sur un shell avec l'utilisateur nagios et le mail a été envoyé correctement.
Donc aucun soucis au niveau de mon relai smtp.
Voici un exemple de configuration d'un service down :
define service{
hostgroup_name switches, Hubs, router
service_description ping
is_volatile 1
check_command check_host_alive
max_check_attempts 3
normal_check_interval 60
retry_check_interval 60
active_checks_enabled 0
passive_checks_enabled 1
check_period 24x7
event_handler_enabled 1
notification_interval 60
notification_period 24x7
notification_options w,u,c
notifications_enabled 1
contact_groups Cellule_Reseau
stalking_options o,w,u,c
}
Voici la conf d'un hote du groupe switch:
define host{
host_name SWTEST4
alias Switch test HP
address 10.163.129.64
parents SWTEST1
hostgroups switches
check_command check_host_alive
max_check_attempts 3
active_checks_enabled 0
passive_checks_enabled 1
check_period 24x7
event_handler_enabled 1
contact_groups Cellule_Reseau
notification_interval 60
notification_period 24x7
notification_options d,u,r
notifications_enabled 1
stalking_options o,d,u
}
De plus aucun mail n'apparait dans mon log mail.info (j'utilise postfix comme relai)
Je pense que le soucis est au niveau des droits de l'interface oreon sur l'user nagios mais peut être que l'erreur est tout autre.
Je ne sais pas trop comment vérifier mon idée.
Merci d'avance pour votre aide
Comment