host1 is not a valid parent for host host2

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
acentek
Posts: 123
Joined: Thu Jul 27, 2017 2:00 pm

host1 is not a valid parent for host host2

Post by acentek »

I have a host that was a parent to other devices but I have removed them in the web GUI. However when I Apply Config I get errors that Error: 'host1' is not a valid parent for host 'host2'!. I'm not sure where I can look to see where something is stuck or needs to be manually removed.
acentek
Posts: 123
Joined: Thu Jul 27, 2017 2:00 pm

Re: host1 is not a valid parent for host host2

Post by acentek »

After going into the cd /usr/local/nagios/etc/hosts directory, I was able to go into each host2 .cfg file and remove the 'Parent' line (which referenced host1) and then rm -rf the host1.cfg file altogether. Then ran sh /usr/local/nagiosxi/scripts/reconfigure_nagios.sh and didn't have anymore errors.

I had done this before but not in the same order - removed the host1.cfg first and then when through the other .cfg files and magically the errors came back and the Parent line was there again. So there must be something with the order or operations there.

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

Re: host1 is not a valid parent for host host2

Post by ssax »

When you make a change where you know that the impact of doing so will impact other configs, you can also do this to get the configs back into a good shape:

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
- Once they are done writing, Apply Configuration

In the past it used to write out everything on every apply config, it took a really long time (storage interaction is slow) and so they implemented the functionality to only write the configs that have been modified to speed up the apply config process.
Locked