Possible bug? Renamed host and changed host address

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
User avatar
snapon_admin
Posts: 952
Joined: Mon Jun 10, 2013 10:39 am
Location: Kenosha, WI
Contact:

Possible bug? Renamed host and changed host address

Post by snapon_admin »

I just renamed a host using the bulk name changing tool (so the services all change with it), and then updated the host address to reflect the change (it's checking the DNS name so that changed as well with the server rename) and I'm getting a really weird issue with it. When i force an immediate check it runs fine, and reports OK with the new host address. A few seconds later it reverts back to DOWN and shows the old host address. Also, about 20% of the service checks work fine, with the others saying "invalid hostname: OLD HOSTNAME". If i force an immediate check on those hosts they're fine for a few seconds and then revert to the same error. What do?

EDIT: I'm on XI 5.3.0
avandemore
Posts: 1597
Joined: Tue Sep 27, 2016 4:57 pm

Re: Possible bug? Renamed host and changed host address

Post by avandemore »

Nagios is a set of processes, long running processes can retain stale data. Have you tried restarting Nagios?
Previous Nagios employee
User avatar
snapon_admin
Posts: 952
Joined: Mon Jun 10, 2013 10:39 am
Location: Kenosha, WI
Contact:

Re: Possible bug? Renamed host and changed host address

Post by snapon_admin »

Doesn't applying config do that? If so then yes, probably 6 times since the change. If not, then I just did that. Everything's cleared now, I'll let you know if it breaks again.

EDIT: It didn't work, still broke.
avandemore
Posts: 1597
Joined: Tue Sep 27, 2016 4:57 pm

Re: Possible bug? Renamed host and changed host address

Post by avandemore »

Yes apply config restarts Nagios, but it isn't necessarily run at the end of the wizard. For at least one of the checks which is not working, what is the service definition?
Previous Nagios employee
User avatar
snapon_admin
Posts: 952
Joined: Mon Jun 10, 2013 10:39 am
Location: Kenosha, WI
Contact:

Re: Possible bug? Renamed host and changed host address

Post by snapon_admin »

The service definitions are identical for working and non-working services. Also, the host definition has no reference whatsoever to the old host. I also noticed that I have a goofy ghost host issue. I removed a host and all services at around the same time that I made the above change and that host (the removed one) is still sending alerts and still shows up in Nagios even though there are no cfg files in the /usr/local/nagios/etc/ directories.
avandemore
Posts: 1597
Joined: Tue Sep 27, 2016 4:57 pm

Re: Possible bug? Renamed host and changed host address

Post by avandemore »

Generally speaking, a XI > Configure > Core Config Manager > Config File Management > Delete Files > Write Configs > Verify Files > Restart Nagios Core will get rid of any "ghost" objects.

Does this ghost appear in /usr/local/nagios/var/objects.cache?
Previous Nagios employee
User avatar
snapon_admin
Posts: 952
Joined: Mon Jun 10, 2013 10:39 am
Location: Kenosha, WI
Contact:

Re: Possible bug? Renamed host and changed host address

Post by snapon_admin »

avandemore wrote:Generally speaking, a XI > Configure > Core Config Manager > Config File Management > Delete Files > Write Configs > Verify Files > Restart Nagios Core will get rid of any "ghost" objects.
Yep, I already tried that though and no dice. That's why I came here.
avandemore wrote:Does this ghost appear in /usr/local/nagios/var/objects.cache?
Nope. I also deleted the host that didn't know it's own host address and they are both giving me problems now.
avandemore
Posts: 1597
Joined: Tue Sep 27, 2016 4:57 pm

Re: Possible bug? Renamed host and changed host address

Post by avandemore »

How is the host referenced? IP or hostname? If hostname what does /etc/nsswitch.conf and /etc/hosts say regarding the host? Is this a DNS round robin issue?

Just to be clear, you're also saying that host/service doesn't exist in either CCM or the objects.cache?

If an object doesn't exist in the objects.cache file, then Nagios would have no knowledge of it. Only other thing I could think of multiple Nagios processes. What does this show?

Code: Select all

# ps aux |grep nagios
Please send a current profile along with names of some affected hosts and services in question:

XI > Admin > System Profile > Download Profile

Include the zip file in your response. You can PM myself or other support personnel if you have privacy concerns.
Previous Nagios employee
User avatar
snapon_admin
Posts: 952
Joined: Mon Jun 10, 2013 10:39 am
Location: Kenosha, WI
Contact:

Re: Possible bug? Renamed host and changed host address

Post by snapon_admin »

I just ended up bouncing the box last night which took care of it. I don't like to reboot the box, especially during business hours, which is why I didn't do that earlier. Not sure what caused these issues, but it looks to be cleared now.
avandemore
Posts: 1597
Joined: Tue Sep 27, 2016 4:57 pm

Re: Possible bug? Renamed host and changed host address

Post by avandemore »

Ok, sounds good. Kind of the hammer approach but sometimes that's the easiest. Are we ok to lock this thread?
Previous Nagios employee
Locked