Page 1 of 2
Possible bug? Renamed host and changed host address
Posted: Mon Nov 21, 2016 12:42 pm
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
Re: Possible bug? Renamed host and changed host address
Posted: Mon Nov 21, 2016 3:55 pm
by avandemore
Nagios is a set of processes, long running processes can retain stale data. Have you tried restarting Nagios?
Re: Possible bug? Renamed host and changed host address
Posted: Mon Nov 21, 2016 3:58 pm
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.
Re: Possible bug? Renamed host and changed host address
Posted: Mon Nov 21, 2016 4:07 pm
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?
Re: Possible bug? Renamed host and changed host address
Posted: Mon Nov 21, 2016 4:20 pm
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.
Re: Possible bug? Renamed host and changed host address
Posted: Mon Nov 21, 2016 4:44 pm
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?
Re: Possible bug? Renamed host and changed host address
Posted: Mon Nov 21, 2016 5:01 pm
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.
Re: Possible bug? Renamed host and changed host address
Posted: Mon Nov 21, 2016 5:17 pm
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?
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.
Re: Possible bug? Renamed host and changed host address
Posted: Tue Nov 22, 2016 9:19 am
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.
Re: Possible bug? Renamed host and changed host address
Posted: Tue Nov 22, 2016 10:24 am
by avandemore
Ok, sounds good. Kind of the hammer approach but sometimes that's the easiest. Are we ok to lock this thread?