Notification by Mail
Posted: Mon Aug 31, 2015 9:43 am
Hello eveyrone, I have just installed FAN with Nagios Core 3.4.4,
My problem is about mail notification for services and hosts. In my mind everything seem to be ok regarding set up. I have hostclients.cfg and for each host or service I have the following :
define service{
use generic-service
host_name vCenter,Veeam
service_description Version de NSClient
check_command check_nt!CLIENTVERSION
contacts user
first_notification_delay 0
notification_interval 0
}
in the hostclient I also have the contact user :
define contact{
contact_name user ; Short name of user
use generic-contact ; Inherit default values from generic-contact template (defined above)
alias USER ; Full name of use
email [email protected] ; <<***** CHANGE THIS TO YOUR EMAIL ADDRESS ******
}
The template generic-contact has the two notification type enable:
service_notification_commands notify-service-by-email ; send service notifications via email
host_notification_commands notify-host-by-email
In the nagios log, notifications seem to be correctly sent :
Warning: Contact 'user' host notification command '/usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: PROBLEM\nHost: XXX\nState: DOWN\nAddress: XXX\nInfo: CRITICAL - Host Unreachable (XXX)\n\nDate/Time: Mon+Aug+31+16:31:11+CEST+2015\n" | /usr/bin/Mail -s "** PROBLEM Host Alert: NF1T_02 is DOWN **"[email protected]' timed out after 30 seconds
But in the maillog I cannot find my mail from nagios to [email protected]. Here is an example of maillog:
Aug 31 16:39:01 nagios sendmail[31835]: t7VEcVrR031835: from=nagios, size=0, class=0, nrcpts=0, relay=nagios@localhost
And i don't receive any email...
Can you please help me on this topic ?
Thanks
My problem is about mail notification for services and hosts. In my mind everything seem to be ok regarding set up. I have hostclients.cfg and for each host or service I have the following :
define service{
use generic-service
host_name vCenter,Veeam
service_description Version de NSClient
check_command check_nt!CLIENTVERSION
contacts user
first_notification_delay 0
notification_interval 0
}
in the hostclient I also have the contact user :
define contact{
contact_name user ; Short name of user
use generic-contact ; Inherit default values from generic-contact template (defined above)
alias USER ; Full name of use
email [email protected] ; <<***** CHANGE THIS TO YOUR EMAIL ADDRESS ******
}
The template generic-contact has the two notification type enable:
service_notification_commands notify-service-by-email ; send service notifications via email
host_notification_commands notify-host-by-email
In the nagios log, notifications seem to be correctly sent :
Warning: Contact 'user' host notification command '/usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: PROBLEM\nHost: XXX\nState: DOWN\nAddress: XXX\nInfo: CRITICAL - Host Unreachable (XXX)\n\nDate/Time: Mon+Aug+31+16:31:11+CEST+2015\n" | /usr/bin/Mail -s "** PROBLEM Host Alert: NF1T_02 is DOWN **"[email protected]' timed out after 30 seconds
But in the maillog I cannot find my mail from nagios to [email protected]. Here is an example of maillog:
Aug 31 16:39:01 nagios sendmail[31835]: t7VEcVrR031835: from=nagios, size=0, class=0, nrcpts=0, relay=nagios@localhost
And i don't receive any email...
Can you please help me on this topic ?
Thanks