Page 1 of 1
Can't receive alert mail
Posted: Thu Dec 18, 2014 11:38 pm
by kshaoye
I have set both A and B as the default contacts of host X.
A and B are both in group "admins",as well as admins is the default contacts group of host X.
But only A can receive the alert mail from Nagios.
Now I am watching for some suggestion from someone here.
Thanks
Re: Can't receive alert mail
Posted: Fri Dec 19, 2014 9:33 am
by scottwilkerson
Do both contacts have the exact same notification handlers setup?
Could you post the applicable contact configuration files (obfuscating email addresses of course)?
Re: Can't receive alert mail
Posted: Sat Dec 20, 2014 4:25 am
by kshaoye
scottwilkerson wrote:Do both contacts have the exact same notification handlers setup?
Could you post the applicable contact configuration files (obfuscating email addresses of course)?
Thanks for reply
Here is my configuration files
define host {
host_name switch3
alias Switch 3
display_name Switch 3
address 10.255.1.3
hostgroups Switch
use generic-switch
max_check_attempts 1
active_checks_enabled 1
check_period 24x7
contacts +kevin
contact_groups +admins
notification_interval 5
notification_period 24x7
notification_options d,u,r,f,s
register 1
}
define contact {
contact_name nagiosadmin
alias Nagios Admin
email nagios@localhost
use generic-contact
register 1
}
define contact {
contact_name kevin
alias Kevin
contactgroups admins
host_notifications_enabled 1
service_notifications_enabled 1
host_notification_period 24x7
service_notification_period 24x7
host_notification_options d,u,r,f,s
service_notification_options w,u,c,r,f,s
host_notification_commands notify-host-by-email,notify-service-by-email
service_notification_commands +notify-host-by-email,notify-service-by-email
email
[email protected]
register 1
}
define contactgroup {
contactgroup_name admins
alias Nagios Administrators
members kevin,nagiosadmin
register 1
}
as refered before,nagiosadmin can recieve alert mail but kevin can't
Re: Can't receive alert mail
Posted: Mon Dec 22, 2014 3:26 pm
by scottwilkerson
This definition looks wrong...Specifically in the host_notification_commands and service_notification_commands
Code: Select all
define contact {
contact_name kevin
alias Kevin
contactgroups admins
host_notifications_enabled 1
service_notifications_enabled 1
host_notification_period 24x7
service_notification_period 24x7
host_notification_options d,u,r,f,s
service_notification_options w,u,c,r,f,s
host_notification_commands notify-host-by-email,notify-service-by-email
service_notification_commands +notify-host-by-email,notify-service-by-email
email [email protected]
register 1
}
Lets update to
Code: Select all
define contact {
contact_name kevin
alias Kevin
contactgroups admins
email [email protected]
use generic-contact
register 1
}
Re: Can't receive alert mail
Posted: Tue Dec 23, 2014 2:20 am
by kshaoye
I updated “contacts.cfg” as
define contact {
contact_name kevin
alias Kevin
contactgroups admins
host_notification_period 24x7
service_notification_period 24x7
host_notification_options d,u,r,f,s
service_notification_options w,u,c,r,f,s
host_notification_commands notify-host-by-email
service_notification_commands notify-service-by-email
email
[email protected]
register 1
}
the alert mails can receive now,thank you
Re: Can't receive alert mail
Posted: Tue Dec 23, 2014 10:37 am
by cmerchant
Glad that resolved your issue. We'll go ahead and close this thread.