Nagios is not sending emails
Posted: Tue Feb 27, 2018 6:44 am
Hi,
I've configured nagios to send email on host alerts, however even though my host is down and I can see the nagios.log outputting the alerts but there is no email notification in my Inbox.
here is my config, Am I doing anything wrong here?
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
email [email protected] ; <<***** CHANGE THIS TO YOUR EMAIL ADDRESS ******
}
define host {
use generic-host
name passive_host
active_checks_enabled 0
passive_checks_enabled 1
flap_detection_enabled 0
register 0
check_period 24x7
max_check_attempts 1
check_interval 5
retry_interval 1
check_freshness 1
freshness_threshold 310
contact_groups admins
check_command check-host-alive
notifications_enabled 1
notification_interval 60
notification_period 24x7
notification_options d,u,r
}
define service {
use generic-service
name passive_service
active_checks_enabled 0
passive_checks_enabled 1
flap_detection_enabled 0
register 0
check_period 24x7
max_check_attempts 1
check_interval 5
retry_interval 1
check_freshness 1
freshness_threshold 360
contact_groups admins
check_command check_dummy!0
notifications_enabled 1
notification_interval 60
notification_period 24x7
notification_options w,u,c,r
}
Thanks,
Charan
I've configured nagios to send email on host alerts, however even though my host is down and I can see the nagios.log outputting the alerts but there is no email notification in my Inbox.
here is my config, Am I doing anything wrong here?
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
email [email protected] ; <<***** CHANGE THIS TO YOUR EMAIL ADDRESS ******
}
define host {
use generic-host
name passive_host
active_checks_enabled 0
passive_checks_enabled 1
flap_detection_enabled 0
register 0
check_period 24x7
max_check_attempts 1
check_interval 5
retry_interval 1
check_freshness 1
freshness_threshold 310
contact_groups admins
check_command check-host-alive
notifications_enabled 1
notification_interval 60
notification_period 24x7
notification_options d,u,r
}
define service {
use generic-service
name passive_service
active_checks_enabled 0
passive_checks_enabled 1
flap_detection_enabled 0
register 0
check_period 24x7
max_check_attempts 1
check_interval 5
retry_interval 1
check_freshness 1
freshness_threshold 360
contact_groups admins
check_command check_dummy!0
notifications_enabled 1
notification_interval 60
notification_period 24x7
notification_options w,u,c,r
}
Thanks,
Charan