Ghost contact preventing changes

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
NMFSTeam
Posts: 88
Joined: Thu Nov 12, 2015 9:01 am

Ghost contact preventing changes

Post by NMFSTeam »

We have Nagios XI 5.6.5. We are trying to add a new host to the configuration for monitoring, via the standard Windows SNMP wizard, but when it goes to write the config, it fails, and we are getting an error message about "john.doe" on a .cfg file. The user "john.doe" was deleted, but apparently is still present on three .cfg files. How do we get rid of him, and proceed?

Full error is:

Code: Select all

Website: https://www.nagios.org
Reading configuration data...
   Read main config file okay...
Error: Contact 'john.doe' is not defined anywhere!
Error: Could not add contact 'john.doe' to host (config file '/usr/local/nagios/etc/hosts/HQ-TRANSIT-SW.cfg', starting on line 16)
   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 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.
Found three entries that still have this user:

Code: Select all

[root@nagios01 ~]# find /usr/local/nagios/etc/hosts/ -type f -exec grep -H 'john.doe' {} \;
/usr/local/nagios/etc/hosts/HQ-BACKBONE-SW.cfg:    contacts                    john.doe
/usr/local/nagios/etc/hosts/HQ-TRANSIT-SW.cfg:    contacts                 john.doe
/usr/local/nagios/etc/hosts/HQ-WAN_TRANSIT-SW.cfg:    contacts                    john.doe
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

Re: Ghost contact preventing changes

Post by mbellerue »

Looks like you've done most of the leg work. Just go to Configure -> Core Configuration Manager -> Hosts -> <One of the three hosts you found> -> Alert Settings -> Manage Contacts.

Your ghost should show up there under the Assigned section. You can just remove them from there, apply your configuration, and be good to go.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
NMFSTeam
Posts: 88
Joined: Thu Nov 12, 2015 9:01 am

Re: Ghost contact preventing changes

Post by NMFSTeam »

The ghost contact does not appear there. If I go through the standard interface (not the CCM), pull up the host, and go to Configure, Contacts, he shows up there, I can uncheck him, but then when I click save, I get the same error.
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

Re: Ghost contact preventing changes

Post by mbellerue »

Drat, I thought that was going to be too easy.

Let's try it this way. This is a slightly different problem, but the resolution is what I'd like you to try.

https://support.nagios.com/kb/article/n ... d-144.html

Basically we're just going to try destroying the config files and rebuilding them based on what is in the database.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
NMFSTeam
Posts: 88
Joined: Thu Nov 12, 2015 9:01 am

Re: Ghost contact preventing changes

Post by NMFSTeam »

Worked like a charm! Had to write the files out, then delete them, write them out again, verify, and restart. Thank you so much!
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Ghost contact preventing changes

Post by scottwilkerson »

mblower wrote:Worked like a charm! Had to write the files out, then delete them, write them out again, verify, and restart. Thank you so much!
Great!

Locking
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked