unable to delete contacts.cfg present in static dir
Posted: Tue Nov 06, 2018 4:55 am
Hello Nagios Crew,
I am having a strange issue with my contacts.cfg file. This file is present in /usr/local/nagios/etc/ and in /usr/local/nagios/etc/static.
I am unable to delete the contacts.cfg file in the stic directory. Every time nagios restarts it will recreate this file in the static directory giving me errors every time I add a contact or contact group:
Error: Could not find any contact matching 'francesco.surace' (config file '/usr/local/nagios/etc/contactgroups.cfg', starting on line 70)
Error: Failed to expand contacts for contactgroup 'WEBMETHODS' (config file '/usr/local/nagios/etc/contactgroups.cfg', starting at line 70)
Error: Contact 'sandro.ginnari' is not defined anywhere!
Error: Could not add contact 'sandro.ginnari' to host (config file '/usr/local/nagios/etc/hosts/EINAGFUITMI01.cfg', starting on line 16)
If I look in contacts.cfg (the one in /usr/local/nagios/etc/):
define contact {
contact_name francesco.surace
alias WEBMETHODS
host_notifications_enabled 1
service_notifications_enabled 1
host_notification_period webmethods_notification_times
service_notification_period webmethods_notification_times
host_notification_options d,r,
service_notification_options w,c,r,
host_notification_commands xi_host_event_handler
service_notification_commands xi_service_event_handler
email [email protected]
use xi_contact_generic
}
AND
define contact {
contact_name sandro.ginnari
alias sandro.ginnari
host_notifications_enabled 1
service_notifications_enabled 1
host_notification_period sandro.ginnari_notification_times
service_notification_period sandro.ginnari_notification_times
host_notification_options d,r,
service_notification_options w,c,r,
email [email protected]
use xi_contact_generic
}
If I lookin my contactgroup.cfg I see:
define contactgroup {
contactgroup_name WEBMETHODS
alias WEBMETHODS
members daniele.devenezia,francesco.surace
}
define contactgroup {
contactgroup_name xi_contactgroup_all
alias All Contacts
members *
}
which looks ok to me.
I think all this mess is due to the presence of the contacts.cfg in the static dir. How do I delete it permanently?
Thanks
Sandro
I am having a strange issue with my contacts.cfg file. This file is present in /usr/local/nagios/etc/ and in /usr/local/nagios/etc/static.
I am unable to delete the contacts.cfg file in the stic directory. Every time nagios restarts it will recreate this file in the static directory giving me errors every time I add a contact or contact group:
Error: Could not find any contact matching 'francesco.surace' (config file '/usr/local/nagios/etc/contactgroups.cfg', starting on line 70)
Error: Failed to expand contacts for contactgroup 'WEBMETHODS' (config file '/usr/local/nagios/etc/contactgroups.cfg', starting at line 70)
Error: Contact 'sandro.ginnari' is not defined anywhere!
Error: Could not add contact 'sandro.ginnari' to host (config file '/usr/local/nagios/etc/hosts/EINAGFUITMI01.cfg', starting on line 16)
If I look in contacts.cfg (the one in /usr/local/nagios/etc/):
define contact {
contact_name francesco.surace
alias WEBMETHODS
host_notifications_enabled 1
service_notifications_enabled 1
host_notification_period webmethods_notification_times
service_notification_period webmethods_notification_times
host_notification_options d,r,
service_notification_options w,c,r,
host_notification_commands xi_host_event_handler
service_notification_commands xi_service_event_handler
email [email protected]
use xi_contact_generic
}
AND
define contact {
contact_name sandro.ginnari
alias sandro.ginnari
host_notifications_enabled 1
service_notifications_enabled 1
host_notification_period sandro.ginnari_notification_times
service_notification_period sandro.ginnari_notification_times
host_notification_options d,r,
service_notification_options w,c,r,
email [email protected]
use xi_contact_generic
}
If I lookin my contactgroup.cfg I see:
define contactgroup {
contactgroup_name WEBMETHODS
alias WEBMETHODS
members daniele.devenezia,francesco.surace
}
define contactgroup {
contactgroup_name xi_contactgroup_all
alias All Contacts
members *
}
which looks ok to me.
I think all this mess is due to the presence of the contacts.cfg in the static dir. How do I delete it permanently?
Thanks
Sandro