Page 1 of 2

Hosts disappearing from service when added

Posted: Wed Nov 29, 2023 11:20 pm
by ndg
I've recently done an in place upgrade of our Nagios server from RHEL 7 to 8. Everything appears to be working fine, except for when we try to add hosts to a service. After adding the host and clicking save, if you check the service again there will be no hosts attached to it. Hosts that were added previously also disappear.

Attempting to apply the configuration returns the error: Error: Service has no hosts and/or service_description (config file '/usr/local/nagios/etc/services/Check C: drive.cfg', starting on line 16). But when checking this file the list of hosts are clearly there.

Re: Hosts disappearing from service when added

Posted: Thu Nov 30, 2023 11:31 am
by jmichaelson
That means there's a problem with the configuration file that was created. You can restore to the previous known good configuration by going into the Config Snapshots menu item under the admin tab. Then you should be able to re-create the offending host.

Re: Hosts disappearing from service when added

Posted: Thu Nov 30, 2023 4:53 pm
by ndg
After restoring to a good configuration the issue persists, we've tried several and none of them resolve it. We've found making any change at all makes the hosts disappear. Even just clicking Save without making any changes will cause the issue to occur

Re: Hosts disappearing from service when added

Posted: Thu Nov 30, 2023 7:20 pm
by kg2857
Did you run the restore repair script after restoring on the new OS? Check the backup docs if not.

Re: Hosts disappearing from service when added

Posted: Thu Nov 30, 2023 11:39 pm
by ndg
kg2857 wrote: Thu Nov 30, 2023 7:20 pm Did you run the restore repair script after restoring on the new OS? Check the backup docs if not.
We didn't do a migration, we did an in-place upgrade of the OS. No luck after running the repair script either

Re: Hosts disappearing from service when added

Posted: Fri Dec 01, 2023 10:58 am
by jmichaelson
Due to the sheer variety of issues that this could be, I'm afraid this is going to require more advanced troubleshooting than what we can provide here. I'd recommend opening up a formal support ticket.

Re: Hosts disappearing from service when added

Posted: Fri Dec 01, 2023 11:05 pm
by kg2857
If the OP has nagios backups from before the uograde, I'd suggest copying them to another host. You might want to do a reinstall of the OS, and follow the backup restore docs to restore and then repair.

Re: Hosts disappearing from service when added

Posted: Mon Dec 04, 2023 4:31 pm
by ndg
jmichaelson wrote: Fri Dec 01, 2023 10:58 am Due to the sheer variety of issues that this could be, I'm afraid this is going to require more advanced troubleshooting than what we can provide here. I'd recommend opening up a formal support ticket.
This link is currently 404ing for me. Will it be up again soon?
kg2857 wrote: Fri Dec 01, 2023 11:05 pm If the OP has nagios backups from before the uograde, I'd suggest copying them to another host. You might want to do a reinstall of the OS, and follow the backup restore docs to restore and then repair.
That seems to be the next best step. Will give that a try today

Re: Hosts disappearing from service when added

Posted: Mon Dec 04, 2023 5:10 pm
by jmichaelson
Eek.

This should be the link https://answerhub.nagios.com/support/s/

Re: Hosts disappearing from service when added

Posted: Sun Dec 10, 2023 8:47 pm
by ndg
ndg wrote: Mon Dec 04, 2023 4:31 pm
jmichaelson wrote: Fri Dec 01, 2023 10:58 am Due to the sheer variety of issues that this could be, I'm afraid this is going to require more advanced troubleshooting than what we can provide here. I'd recommend opening up a formal support ticket.
This link is currently 404ing for me. Will it be up again soon?
kg2857 wrote: Fri Dec 01, 2023 11:05 pm If the OP has nagios backups from before the uograde, I'd suggest copying them to another host. You might want to do a reinstall of the OS, and follow the backup restore docs to restore and then repair.
That seems to be the next best step. Will give that a try today
Rebuilt the server successfully last week and had no troubles since :D