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
}
help to troubleshoot configuration errors
Re: help to troubleshoot configuration errors
The directive:
is reserved for templates. Remove the directive from your actual objects (like your particular contacts). If you look at the nagiosadmin contact, you will notice the distinct lack of a register directive. For more information, see:
http://nagios.sourceforge.net/docs/3_0/ ... tance.html
Code: Select all
register 0
http://nagios.sourceforge.net/docs/3_0/ ... tance.html
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Re: help to troubleshoot configuration errors
That does it. It works now. Thanks a lot.
Re: help to troubleshoot configuration errors
No problem. Enjoy the week.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.