Answer the question
In order to leave comments, you need to log in
Nagios contacts_nagios2.cfg broken, how to fix it?
I edited the contacts_nagios2.cfg file to configure email notifications, as a result, nagios refuses to accept it.
So with the team
service nagios3 restartI get an error
Error: Invalid contact object directive 'user_name'.
Error: Could not add object property in file '/etc/nagios3/conf.d/contacts_nagios2.cfg' on line 19.
Error processing object config files!
define contact{
contact_name nagiosadmin ; Short name of user
user_name 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 ******
#email [email protected] ; <<***** CHANGE THIS TO YOUR EMAIL ADDRESS ******
}
define contactgroup{
contactgroup_name admins
alias Nagios Administrators
members root, nagiosadmin
}
Answer the question
In order to leave comments, you need to log in
replacing the content from what is in the description of the problem with the description:
define contact{
contact_name USERNAME
service_notification_period 24x7
host_notification_period 24x7
service_notification_options w,u,c,r,f,s
host_notification_options d,u,r,f,s
service_notification_commands notify-host-by-email
host_notification_commands notify-host-by-email
email [email protected] localhost
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question