deleting host with relations

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
elinagios
Posts: 146
Joined: Thu Feb 16, 2017 3:45 am

deleting host with relations

Post by elinagios »

Hello

Nagios environment:
Centos 7
NagiosXI 5.7.5

In the past (not sure from what version it changed) there was a check from nagios that did not allow you to delete a host if that host had relations with services. That was really useful. For some reason it is no longer there. I've had several occasions where users go and delete host with relations and there is no other means for me to correct this problem but to take back last good snapshot. Last was a case, where a host belonged to a hostgroup and the hostgroup was connected to a service. User was able to delete host and after that the configuration had errors in it. But as host was deleted, i couldnt remove it from hostgroup to correct the issue.

1) Can you please bring back this feature where you cant delete hosts with relations?
2) If the situation occurs, is there a way to fix this without doing rollback to working configurations?

Thank you!
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: deleting host with relations

Post by ssax »

1) Development changed that because a lot of people requested it do that, I'm not sure they'll change it back but I can request that they add the option to enable that functionality or not if you'd like?

2) The only way to re-add them would be to revert to the snapshot or re-import the configs.

Technically, you should be able to do this:

Please go to Configure > Core Config Manager > Tools > Config File Management:
- Click the Delete Files button (don't worry, it's safe, they will be rewritten)
- Then click the Write Configs button
- Then click the Verify Files button, if it verifies, apply configuration

Or this:

Go edit the hostgroup, click manage hosts button, even though the host isn't listed in there and you aren't changing anything, click OK, then click Save (so the backend file will be updated with the latest changes) and then it should allow you to apply.
Locked