Page 1 of 1

Saving a service removes the managed hosts

Posted: Thu Oct 09, 2025 11:31 am
by adiastra
We are trying to upgrade to a new database server. Our current install is NagiosXI 5.11.2

We know this is old, and we are trying to upgrade it, which requires us to migrate to a more modern DB server.

We have had no issues creating the DB(s) and grants for the user; as a matter of fact, Nagios loads just fine, and everything seems to work until you try to make a change.

To clarify, all DB users can write, and some changes are implemented successfully. We have identified a reproducible issue that happens every time.

If we go to CCM and open a service, any service, and without even changing anything, just click "Save," the service changes need to be applied.

Now, if we go back into that service, we will see that the "manage Hosts" is now missing (0). And of course, trying to apply this change fails with the error "Service has no hosts and/or service_description"

So anytime we save a service (or try to create a new one), the "manage Hosts" is not saved, or if it previously existed, is removed.

Re: Saving a service removes the managed hosts

Posted: Thu Oct 09, 2025 1:14 pm
by DoubleDoubleA
Hi @adiastra,

So you are running a remote DB?

Your XI didn't display this behavior before you switched DBs, but now since the switch you see this behavior?

We can chat a little here, of course, but this may be something you want to use a support ticket for. The development team staffs the forum for Nagios, so we're fairly clever but by policy we don't get too deep into troubleshooting an issue like this.

Aaon

Re: Saving a service removes the managed hosts

Posted: Sun Oct 12, 2025 10:24 pm
by Toniaoley
If the “managed hosts” are being cleared when saving, it could be a problem with the CCM table relationships or foreign key integrity in the new database. I’d suggest checking whether the nagiosql_service and nagiosql_relations tables are writing correctly and that the id values are preserved after saving. If they reset to zero or null, Nagios will treat the entry as unlinked.