M
M
My-MyGovoritKorovka2016-01-25 13:31:32
Nagios
My-MyGovoritKorovka, 2016-01-25 13:31:32

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 restart
I 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!

OS ubuntu server
By nagios3 (fresh)
content of contacts_nagios2.cfg file:
contacts:
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 ******
}

groups:
define contactgroup{
contactgroup_name admins
alias Nagios Administrators
members root, nagiosadmin
}

as you can see, everything is in the standard (returned), but for some reason, this config does not eat nagios. What to do ?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
My-MyGovoritKorovka, 2016-01-25
@My-MyGovoritKorovka

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
}

the problem was solved.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question