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
Can't receive alert mail
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Can't receive alert mail
Do both contacts have the exact same notification handlers setup?
Could you post the applicable contact configuration files (obfuscating email addresses of course)?
Could you post the applicable contact configuration files (obfuscating email addresses of course)?
Re: Can't receive alert mail
Thanks for replyscottwilkerson wrote:Do both contacts have the exact same notification handlers setup?
Could you post the applicable contact configuration files (obfuscating email addresses of course)?
Here is my configuration files
as refered before,nagiosadmin can recieve alert mail but kevin can'tdefine 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
}
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Can't receive alert mail
This definition looks wrong...Specifically in the host_notification_commands and service_notification_commands
Lets update to
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
}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
I updated “contacts.cfg” as
the alert mails can receive now,thank youdefine 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
}
Re: Can't receive alert mail
Glad that resolved your issue. We'll go ahead and close this thread.