I am trying to create a contacts.cfg
in Nagios so that it will contact two different email at different events. One is our regular email and one is our gmail which is configured to call us on an event something went down. Below are my settings
define contact {
name mainemail
service_notification_options c,u,r
host_notification_options d,u,r
service_notification_commands notify-service-by-email
host_notification_commands notify-host-by-email
register 0
email [email protected]
service_notification_period 24x7
host_notification_period 24x7
}
define contact {
name emergencyadmin
service_notification_options c,u
host_notification_options d,u,r
service_notification_commands notify-service-by-email
host_notification_commands notify-host-by-email
register 0
email [email protected]
service_notification_period 24x7
host_notification_period 24x7
}
define contactgroup {
contactgroup_name nagiosadmin-emergencyadmin
members mainemail,emergencyadmin
}
and my errors are
Error: Unexpected token or statement in file '/usr/local/nagios/etc/objects/contacts.cfg' on line 7.
Error processing object config files!
***> One or more problems was encountered while processing the config files...
Check your configuration file(s) to ensure that they contain valid
directives and data defintions. If you are upgrading from a previous
version of Nagios, you should be aware that some variables/definitions
may have been removed or modified in this version. Make sure to read
the HTML documentation regarding the config files, as well as the
'Whats New' section to find out what has changed.
Can anyone point towards right direction?