help to troubleshoot configuration errors
Posted: Mon Aug 05, 2013 2:38 pm
I added two contacts and two contact groups in contacts.cfg. However, I kept getting configuration errors.
Checking contact groups...
Error: Contact 'email-contact' specified in contact group 'email' is not defined anywhere!
Error: Contact 'pager-contact' specified in contact group 'pager-email' is not defined anywhere!
Error: Contact 'email-contact' specified in contact group 'pager-email' is not defined anywhere!
I think that the contacts are defined in contacts.cfg. Am I missing something?
My contacts.cfg is as follows:
define contact{
contact_name email-contact ; Short name of user
contactgroups email,pager-email
service_notification_options w,u,c,r,f,s
host_notification_options d,u,r,f,s
service_notification_commands notify-service-by-email
host_notification_commands notify-host-by-email
register 0
service_notification_period 24x7
host_notification_period 24x7
email <email address>
}
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> ; <<***** CHANGE THIS TO YOUR EMAIL ADDRESS ******
}
define contact{
contact_name pager-contact ; Short name of user
contactgroups pager-email
service_notification_options c,r
host_notification_options d,u,r
service_notification_commands notify-service-by-pager
host_notification_commands notify-host-by-pager
register 0
service_notification_period 24x7
host_notification_period 24x7
pager <pager>
}
###############################################################################
###############################################################################
#
# CONTACT GROUPS
#
###############################################################################
###############################################################################
# We only have one contact in this simple configuration file, so there is
# no need to create more than one contact group.
define contactgroup{
contactgroup_name admins
alias Nagios Administrators
members nagiosadmin
}
define contactgroup{
contactgroup_name pager-email
members pager-contact,email-contact
}
define contactgroup{
contactgroup_name email
members email-contact
}
Checking contact groups...
Error: Contact 'email-contact' specified in contact group 'email' is not defined anywhere!
Error: Contact 'pager-contact' specified in contact group 'pager-email' is not defined anywhere!
Error: Contact 'email-contact' specified in contact group 'pager-email' is not defined anywhere!
I think that the contacts are defined in contacts.cfg. Am I missing something?
My contacts.cfg is as follows:
define contact{
contact_name email-contact ; Short name of user
contactgroups email,pager-email
service_notification_options w,u,c,r,f,s
host_notification_options d,u,r,f,s
service_notification_commands notify-service-by-email
host_notification_commands notify-host-by-email
register 0
service_notification_period 24x7
host_notification_period 24x7
email <email address>
}
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> ; <<***** CHANGE THIS TO YOUR EMAIL ADDRESS ******
}
define contact{
contact_name pager-contact ; Short name of user
contactgroups pager-email
service_notification_options c,r
host_notification_options d,u,r
service_notification_commands notify-service-by-pager
host_notification_commands notify-host-by-pager
register 0
service_notification_period 24x7
host_notification_period 24x7
pager <pager>
}
###############################################################################
###############################################################################
#
# CONTACT GROUPS
#
###############################################################################
###############################################################################
# We only have one contact in this simple configuration file, so there is
# no need to create more than one contact group.
define contactgroup{
contactgroup_name admins
alias Nagios Administrators
members nagiosadmin
}
define contactgroup{
contactgroup_name pager-email
members pager-contact,email-contact
}
define contactgroup{
contactgroup_name email
members email-contact
}