Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
When i send email like "mail -s "subject" abc@domainname < /dev/null" it works perfectly but not working when send custom notification or any warning and critical state.
I have fixed it at my own by set the following settings in contacts.cfg file:
define contact{
contact_name nagiosadmin ; Short name of user
use generic-contact ; Inherit default values from generic-contact template (defined above)
alias Nagios Admin ; Full name of user
service_notification_period 24x7 ; service notifications can be sent anytime
host_notification_period 24x7 ; host notifications can be sent anytime
service_notification_options w,u,c,r,f,s ; send notifications for all service states, flapping events, and scheduled downt$
host_notification_options d,u,r,f,s ; send notifications for all host states, flapping events, and scheduled downtime$
service_notification_commands notify-service-by-email ; send service notifications via email
host_notification_commands notify-host-by-email ; send host notifications via email
service_notification_commands notify-service-by-email,notify-service-by-sms
host_notification_commands notify-host-by-email,notify-host-by-sms
email Email ID ; <<***** CHANGE THIS TO YOUR EMAIL ADDRESS ******
}