Deleted 'testuser' Contact and now getting config errors ...
Deleted 'testuser' Contact and now getting config errors ...
Hello:
I have deleted a Contact called "testuser" without checking through Contact Groups, etc., and now getting config errors when trying to "Apply Configuration".
I have found this post - https://support.nagios.com/forum/viewto ... 16&t=54439 - have completed the following steps, below, next to "STEPS:", but am still getting errors. I have provided the edited output, below, under "RESULT:".
I require assistance to get this fixed. Thank you!
STEPS: Go to the CCM > Tools > Config File Management, and click on all three buttons in the following order: Delete Files > Write Configs > Verify Files.
RESULT:
Verify files:
Error: Contact 'testuser' has no service notification commands defined!
Error: Contact 'testuser' has no host notification commands defined!
Nagios Core 4.4.5
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 2019-08-20
License: GPL
Website: https://www.nagios.org
Reading configuration data...
Read main config file okay...
Warning: Duplicate definition found for service 'Uptime' on host '<EDITED>' (config file '/usr/local/nagios/etc/services/<EDITED>.cfg', starting on line 204)
Warning: Duplicate definition found for service 'Print Spooler' on host '<EDITED>' (config file '/usr/local/nagios/etc/services/<EDITED>.cfg', starting on line 166)
Warning: Duplicate definition found for service 'Ping' on host '<EDITED>' (config file '/usr/local/nagios/etc/services/<EDITED>.cfg', starting on line 130)
Warning: Duplicate definition found for service 'Memory Usage' on host '<EDITED>' (config file '/usr/local/nagios/etc/services/<EDITED>.cfg', starting on line 92)
Warning: Duplicate definition found for service 'Drive C: Disk Usage' on host '<EDITED>' (config file '/usr/local/nagios/etc/services/<EDITED>.cfg', starting on line 54)
Warning: Duplicate definition found for service 'CPU Usage' on host '<EDITED>' (config file '/usr/local/nagios/etc/services/<EDITED>.cfg', starting on line 16)
Read object config files okay...
Running pre-flight check on configuration data...
Checking objects...
Checked 1149 services.
Warning: Host '<IP_EDITED>.2' has no default contacts or contactgroups defined!
Warning: Host '<IP_EDITED>.3' has no default contacts or contactgroups defined!
Warning: Host '<IP_EDITED>.4' has no default contacts or contactgroups defined!
Warning: Host '<IP_EDITED>.5' has no default contacts or contactgroups defined!
Warning: Host '<IP_EDITED>.6' has no default contacts or contactgroups defined!
Warning: Host '<IP_EDITED>.7' has no default contacts or contactgroups defined!
Warning: Host '<IP_EDITED>.8' has no default contacts or contactgroups defined!
Checked 351 hosts.
Checked 45 host groups.
Checked 43 service groups.
Error: Contact 'testuser' has no service notification commands defined!
Error: Contact 'testuser' has no host notification commands defined!
Warning: Contact 'testuser' has no service notification time period defined!
Warning: Contact 'testuser' has no host notification time period defined!
Checked 33 contacts.
Checked 7 contact groups.
Checked 169 commands.
Checked 39 time periods.
Checked 0 host escalations.
Checked 0 service escalations.
Checking for circular paths...
Checked 351 hosts
Checked 0 service dependencies
Checked 0 host dependencies
Checked 39 timeperiods
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...
Total Warnings: 9
Total Errors: 2
***> One or more problems was encountered while running the pre-flight check...
Check your configuration file(s) to ensure that they contain valid
directives and data definitions. 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.
I have deleted a Contact called "testuser" without checking through Contact Groups, etc., and now getting config errors when trying to "Apply Configuration".
I have found this post - https://support.nagios.com/forum/viewto ... 16&t=54439 - have completed the following steps, below, next to "STEPS:", but am still getting errors. I have provided the edited output, below, under "RESULT:".
I require assistance to get this fixed. Thank you!
STEPS: Go to the CCM > Tools > Config File Management, and click on all three buttons in the following order: Delete Files > Write Configs > Verify Files.
RESULT:
Verify files:
Error: Contact 'testuser' has no service notification commands defined!
Error: Contact 'testuser' has no host notification commands defined!
Nagios Core 4.4.5
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 2019-08-20
License: GPL
Website: https://www.nagios.org
Reading configuration data...
Read main config file okay...
Warning: Duplicate definition found for service 'Uptime' on host '<EDITED>' (config file '/usr/local/nagios/etc/services/<EDITED>.cfg', starting on line 204)
Warning: Duplicate definition found for service 'Print Spooler' on host '<EDITED>' (config file '/usr/local/nagios/etc/services/<EDITED>.cfg', starting on line 166)
Warning: Duplicate definition found for service 'Ping' on host '<EDITED>' (config file '/usr/local/nagios/etc/services/<EDITED>.cfg', starting on line 130)
Warning: Duplicate definition found for service 'Memory Usage' on host '<EDITED>' (config file '/usr/local/nagios/etc/services/<EDITED>.cfg', starting on line 92)
Warning: Duplicate definition found for service 'Drive C: Disk Usage' on host '<EDITED>' (config file '/usr/local/nagios/etc/services/<EDITED>.cfg', starting on line 54)
Warning: Duplicate definition found for service 'CPU Usage' on host '<EDITED>' (config file '/usr/local/nagios/etc/services/<EDITED>.cfg', starting on line 16)
Read object config files okay...
Running pre-flight check on configuration data...
Checking objects...
Checked 1149 services.
Warning: Host '<IP_EDITED>.2' has no default contacts or contactgroups defined!
Warning: Host '<IP_EDITED>.3' has no default contacts or contactgroups defined!
Warning: Host '<IP_EDITED>.4' has no default contacts or contactgroups defined!
Warning: Host '<IP_EDITED>.5' has no default contacts or contactgroups defined!
Warning: Host '<IP_EDITED>.6' has no default contacts or contactgroups defined!
Warning: Host '<IP_EDITED>.7' has no default contacts or contactgroups defined!
Warning: Host '<IP_EDITED>.8' has no default contacts or contactgroups defined!
Checked 351 hosts.
Checked 45 host groups.
Checked 43 service groups.
Error: Contact 'testuser' has no service notification commands defined!
Error: Contact 'testuser' has no host notification commands defined!
Warning: Contact 'testuser' has no service notification time period defined!
Warning: Contact 'testuser' has no host notification time period defined!
Checked 33 contacts.
Checked 7 contact groups.
Checked 169 commands.
Checked 39 time periods.
Checked 0 host escalations.
Checked 0 service escalations.
Checking for circular paths...
Checked 351 hosts
Checked 0 service dependencies
Checked 0 host dependencies
Checked 39 timeperiods
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...
Total Warnings: 9
Total Errors: 2
***> One or more problems was encountered while running the pre-flight check...
Check your configuration file(s) to ensure that they contain valid
directives and data definitions. 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.
Newbie '14
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Deleted 'testuser' Contact and now getting config errors
Can we first figure out where testuser still exists in the configurations, being you deleted it?
Code: Select all
grep testuser -R /usr/local/nagios/etcRe: Deleted 'testuser' Contact and now getting config errors
Here you go:
"
./hosts/<FQDN_Edited>.cfg: contacts testuser
./hosts/<NEW_RESOURCE_Edited>.cfg: contacts <NEW_Admin_Edited>,testuser
./services/<FQDN_Edited>.cfg: contacts testuser
./services/<FQDN_Edited>.cfg: contacts testuser
./services/<FQDN_Edited>.cfg: contacts testuser
./services/<FQDN_Edited>.cfg: contacts testuser
./services/<FQDN_Edited>.cfg: contacts testuser
./services/<FQDN_Edited>.cfg: contacts testuser
./services/<NEW_RESOURCE_Edited>.cfg: contacts <NEW_Admin_Edited>,testuser
./services/<NEW_RESOURCE_Edited>.cfg: contacts <NEW_Admin_Edited>,testuser
./services/<NEW_RESOURCE_Edited>.cfg: contacts <NEW_Admin_Edited>,testuser
./services/<NEW_RESOURCE_Edited>.cfg: contacts <NEW_Admin_Edited>,testuser
./services/<NEW_RESOURCE_Edited>.cfg: contacts <NEW_Admin_Edited>,testuser
./timeperiods.cfg: timeperiod_name testuser_notification_times
./timeperiods.cfg: alias Notification Times for testuser
./contacts.cfg: contact_name testuser
./contacts.cfg: host_notification_period testuser_notification_times
./contacts.cfg: service_notification_period testuser_notification_times
"
"
./hosts/<FQDN_Edited>.cfg: contacts testuser
./hosts/<NEW_RESOURCE_Edited>.cfg: contacts <NEW_Admin_Edited>,testuser
./services/<FQDN_Edited>.cfg: contacts testuser
./services/<FQDN_Edited>.cfg: contacts testuser
./services/<FQDN_Edited>.cfg: contacts testuser
./services/<FQDN_Edited>.cfg: contacts testuser
./services/<FQDN_Edited>.cfg: contacts testuser
./services/<FQDN_Edited>.cfg: contacts testuser
./services/<NEW_RESOURCE_Edited>.cfg: contacts <NEW_Admin_Edited>,testuser
./services/<NEW_RESOURCE_Edited>.cfg: contacts <NEW_Admin_Edited>,testuser
./services/<NEW_RESOURCE_Edited>.cfg: contacts <NEW_Admin_Edited>,testuser
./services/<NEW_RESOURCE_Edited>.cfg: contacts <NEW_Admin_Edited>,testuser
./services/<NEW_RESOURCE_Edited>.cfg: contacts <NEW_Admin_Edited>,testuser
./timeperiods.cfg: timeperiod_name testuser_notification_times
./timeperiods.cfg: alias Notification Times for testuser
./contacts.cfg: contact_name testuser
./contacts.cfg: host_notification_period testuser_notification_times
./contacts.cfg: service_notification_period testuser_notification_times
"
scottwilkerson wrote:Can we first figure out where testuser still exists in the configurations, being you deleted it?Code: Select all
grep testuser -R /usr/local/nagios/etc
Newbie '14
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Deleted 'testuser' Contact and now getting config errors
It appears that it isn't deleted
Can you go to the CCM -> Contacts and search for testuser
Does it exist?
Can you go to the CCM -> Contacts and search for testuser
Does it exist?
Re: Deleted 'testuser' Contact and now getting config errors
"testuser" did not exist, but I ran "Apply Configuration" and got the error:
"
Error: Contact 'testuser' is not defined anywhere!
Error: Could not add contact 'testuser' to host (config file '/usr/local/nagios/etc/hosts/<NEW_HOST_ADDED_AFTER_I_LEFT>.cfg', starting on line 16)
"
"
Error: Contact 'testuser' is not defined anywhere!
Error: Could not add contact 'testuser' to host (config file '/usr/local/nagios/etc/hosts/<NEW_HOST_ADDED_AFTER_I_LEFT>.cfg', starting on line 16)
"
Newbie '14
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Deleted 'testuser' Contact and now getting config errors
One more Time can I have you run this
Go to the CCM > Tools > Config File Management, and click on all three buttons in the following order:
Delete Files > Write Configs > Verify Files.
Go to the CCM > Tools > Config File Management, and click on all three buttons in the following order:
Delete Files > Write Configs > Verify Files.
Re: Deleted 'testuser' Contact and now getting config errors
1). Successfully deleted all Host / Service Config Files
2).
a). Write host configurations ...
<several hundred configs written>
Host configuration files successfully written!
b). Write service configurations ...
<over 1000 configs written>
Service configuration files successfully written!
Configuration file: hostgroups.cfg successfully written!
Configuration file: servicegroups.cfg successfully written!
Configuration file: hosttemplates.cfg successfully written!
Configuration file: servicetemplates.cfg successfully written!
Configuration file: timeperiods.cfg successfully written!
Configuration file: commands.cfg successfully written!
Configuration file: contacts.cfg successfully written!
Configuration file: contactgroups.cfg successfully written!
Configuration file: contacttemplates.cfg successfully written!
Configuration file: servicedependencies.cfg successfully written!
Configuration file: hostdependencies.cfg successfully written!
Configuration file: serviceescalations.cfg successfully written!
Configuration file: hostescalations.cfg successfully written!
Configuration file: serviceextinfo.cfg successfully written!
Configuration file: hostextinfo.cfg successfully written!
3).
Nagios Core 4.4.5
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 2019-08-20
License: GPL
Website: https://www.nagios.org
Reading configuration data...
Read main config file okay...
Warning: Duplicate definition found for service 'Uptime' on host '<NEW_DEVICE_ADDED_AFTER_I_MOVED_EDITED>.cfg', starting on line 204)
Warning: Duplicate definition found for service 'Print Spooler' on host '<NEW_DEVICE_ADDED_AFTER_I_MOVED_EDITED>.cfg', starting on line 166)
Warning: Duplicate definition found for service 'Ping' on host '<NEW_DEVICE_ADDED_AFTER_I_MOVED_EDITED>.cfg', starting on line 130)
Warning: Duplicate definition found for service 'Memory Usage' on host '<NEW_DEVICE_ADDED_AFTER_I_MOVED_EDITED>.cfg', starting on line 92)
Warning: Duplicate definition found for service 'Drive C: Disk Usage' on host '<NEW_DEVICE_ADDED_AFTER_I_MOVED_EDITED>.cfg', starting on line 54)
Warning: Duplicate definition found for service 'CPU Usage' on host '<NEW_DEVICE_ADDED_AFTER_I_MOVED_EDITED>.cfg', starting on line 16)
Read object config files okay...
Running pre-flight check on configuration data...
Checking objects...
Checked 1149 services.
Warning: Host '<IP_SUBNET_EDITED.2' has no default contacts or contactgroups defined!
Warning: Host '<IP_SUBNET_EDITED.3' has no default contacts or contactgroups defined!
Warning: Host '<IP_SUBNET_EDITED.4' has no default contacts or contactgroups defined!
Warning: Host '<IP_SUBNET_EDITED.5' has no default contacts or contactgroups defined!
Warning: Host '<IP_SUBNET_EDITED.6' has no default contacts or contactgroups defined!
Warning: Host '<IP_SUBNET_EDITED.7' has no default contacts or contactgroups defined!
Warning: Host '<IP_SUBNET_EDITED.8' has no default contacts or contactgroups defined!
Checked 351 hosts.
Checked 45 host groups.
Checked 43 service groups.
Checked 32 contacts.
Checked 7 contact groups.
Checked 169 commands.
Checked 39 time periods.
Checked 0 host escalations.
Checked 0 service escalations.
Checking for circular paths...
Checked 351 hosts
Checked 0 service dependencies
Checked 0 host dependencies
Checked 39 timeperiods
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...
Total Warnings: 7
Total Errors: 0
Things look okay - No serious problems were detected during the pre-flight check
LASTLY, Apply Configuration is still showing a red asterisk identifying new modifications not applied yet.
2).
a). Write host configurations ...
<several hundred configs written>
Host configuration files successfully written!
b). Write service configurations ...
<over 1000 configs written>
Service configuration files successfully written!
Configuration file: hostgroups.cfg successfully written!
Configuration file: servicegroups.cfg successfully written!
Configuration file: hosttemplates.cfg successfully written!
Configuration file: servicetemplates.cfg successfully written!
Configuration file: timeperiods.cfg successfully written!
Configuration file: commands.cfg successfully written!
Configuration file: contacts.cfg successfully written!
Configuration file: contactgroups.cfg successfully written!
Configuration file: contacttemplates.cfg successfully written!
Configuration file: servicedependencies.cfg successfully written!
Configuration file: hostdependencies.cfg successfully written!
Configuration file: serviceescalations.cfg successfully written!
Configuration file: hostescalations.cfg successfully written!
Configuration file: serviceextinfo.cfg successfully written!
Configuration file: hostextinfo.cfg successfully written!
3).
Nagios Core 4.4.5
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 2019-08-20
License: GPL
Website: https://www.nagios.org
Reading configuration data...
Read main config file okay...
Warning: Duplicate definition found for service 'Uptime' on host '<NEW_DEVICE_ADDED_AFTER_I_MOVED_EDITED>.cfg', starting on line 204)
Warning: Duplicate definition found for service 'Print Spooler' on host '<NEW_DEVICE_ADDED_AFTER_I_MOVED_EDITED>.cfg', starting on line 166)
Warning: Duplicate definition found for service 'Ping' on host '<NEW_DEVICE_ADDED_AFTER_I_MOVED_EDITED>.cfg', starting on line 130)
Warning: Duplicate definition found for service 'Memory Usage' on host '<NEW_DEVICE_ADDED_AFTER_I_MOVED_EDITED>.cfg', starting on line 92)
Warning: Duplicate definition found for service 'Drive C: Disk Usage' on host '<NEW_DEVICE_ADDED_AFTER_I_MOVED_EDITED>.cfg', starting on line 54)
Warning: Duplicate definition found for service 'CPU Usage' on host '<NEW_DEVICE_ADDED_AFTER_I_MOVED_EDITED>.cfg', starting on line 16)
Read object config files okay...
Running pre-flight check on configuration data...
Checking objects...
Checked 1149 services.
Warning: Host '<IP_SUBNET_EDITED.2' has no default contacts or contactgroups defined!
Warning: Host '<IP_SUBNET_EDITED.3' has no default contacts or contactgroups defined!
Warning: Host '<IP_SUBNET_EDITED.4' has no default contacts or contactgroups defined!
Warning: Host '<IP_SUBNET_EDITED.5' has no default contacts or contactgroups defined!
Warning: Host '<IP_SUBNET_EDITED.6' has no default contacts or contactgroups defined!
Warning: Host '<IP_SUBNET_EDITED.7' has no default contacts or contactgroups defined!
Warning: Host '<IP_SUBNET_EDITED.8' has no default contacts or contactgroups defined!
Checked 351 hosts.
Checked 45 host groups.
Checked 43 service groups.
Checked 32 contacts.
Checked 7 contact groups.
Checked 169 commands.
Checked 39 time periods.
Checked 0 host escalations.
Checked 0 service escalations.
Checking for circular paths...
Checked 351 hosts
Checked 0 service dependencies
Checked 0 host dependencies
Checked 39 timeperiods
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...
Total Warnings: 7
Total Errors: 0
Things look okay - No serious problems were detected during the pre-flight check
LASTLY, Apply Configuration is still showing a red asterisk identifying new modifications not applied yet.
Newbie '14
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Deleted 'testuser' Contact and now getting config errors
Now please run the following from the CLI
and then an "Apply Configuration" from the GUI
Code: Select all
rm -f /usr/local/nagios/etc/import/*and then an "Apply Configuration" from the GUI
Re: Deleted 'testuser' Contact and now getting config errors
Before I ran the deletion command, I did a list (ls -laF) of that directory and there were no files or symlinks (hidden or otherwise), but, I still ran the command afterwards, then clicked "Apply Configuration". This time it looks like all is working well at this time.
What else would you like me to verify?
What else would you like me to verify?
scottwilkerson wrote:Now please run the following from the CLICode: Select all
rm -f /usr/local/nagios/etc/import/*
and then an "Apply Configuration" from the GUI
Newbie '14
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Deleted 'testuser' Contact and now getting config errors
I think it is all set!This time it looks like all is working well at this time.