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
Notification by Mail
Re: Notification by Mail
Disclaimer: We do not support third party installers, configuration tools, as we didn't write these utilities, and we can't guarantee what they are doing.anthonydb wrote: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
With that being said...
Are you able to receive any email whatsoever from Nagios? A lot of times, sendmail gets filtered out by email providers.
Can you also please provide your command defintion for notify-service-by-email and notify-host-by-email?
Former Nagios Employee.
me.
me.
Re: Notification by Mail
Thanks for your answer, my nagios server don't have an internet connection so i cannot receive mails from the outside. I just want to send email internally on the same local network. I also have a smtp server but i don't know where to put it In the sendmail.mc file ...
Re: Notification by Mail
While I don't have a perfect answer, I did find some things that may help you. This seems like a decent article on the topic.anthonydb wrote:Thanks for your answer, my nagios server don't have an internet connection so i cannot receive mails from the outside. I just want to send email internally on the same local network. I also have a smtp server but i don't know where to put it In the sendmail.mc file ...
We also have a thread here where some suggestions were given.
Former Nagios Employee.
me.
me.
Re: Notification by Mail
Thanks a lot for your answer, I think that I will use the sendemail solution. At the moment I have both sendmail and postfix installed on my nagios server. Perhaps if someone now how to set up Postfix to use an smtp relay it could also be a solution for me.
THanks
THanks
Re: Notification by Mail
Hello everyone, I finally find a solution to this mail issue, I now used sendEmail application to send mail from nagios and it works
Thanks for your help
Thanks for your help
Re: Notification by Mail
Glad that one worked for you! I'll bookmark those articles for future useanthonydb wrote:Hello everyone, I finally find a solution to this mail issue, I now used sendEmail application to send mail from nagios and it works
Thanks for your help
Are we all right to close this one out?
Former Nagios Employee.
me.
me.