Page 1 of 1

Another "Could not find any hostgroup "

Posted: Fri Nov 17, 2023 9:45 am
by jmonn
Hello,

I deleted services and hostgroups, and I cannot apply configuration anymore. Error is :
Error: Could not find any hostgroup matching '<GROUP<' (config file '/usr/local/nagios/etc/services/_multiple_hosts.cfg', starting on line 227)

I already tried to delete/write config files, verify is successful, but still no successful apply configuration. I do not understand where that reference to that deleted exists ?! I tried to grep the sql database nagiosql dump but I cannot find this group (I can however find other groups).

Can you please tell me where nagios XI stores its data, or how I can remove leftovers of this group ?

Thanks,

Jeremy

Re: Another "Could not find any hostgroup "

Posted: Fri Nov 17, 2023 10:16 am
by gwesterman
Hi @jmonn,

There are a few things you could try to potentially resolve this problem:
1) If possible, restore a previous snapshot from before the configuration failed and granularly delete services and hostgroups as needed.
2) Run the database repair script

Code: Select all

/usr/local/nagiosxi/scripts/repair_databases.sh
3) Based on this similar post,
- Check if you have the hostgroup '<GROUP<' and remake it if not:

Code: Select all

grep -R -i '<GROUP<' /usr/local/nagios/etc/hosts /usr/local/nagios/etc/services
grep -i '<GROUP<'/usr/local/nagios/etc/hostgroups.cfg
- Try what worked for this user and verify there are no files in this directory:

Code: Select all

ll /usr/local/nagios/etc/import/
Please let us know if any of these work for you!

Thank you.

Re: Another "Could not find any hostgroup "

Posted: Mon Nov 20, 2023 4:48 am
by jmonn
Hello,

Thanks for your answer.

There are no reference to this group in /usr/local/nagios/etc at all.

Repair database was fine, no errors, but still I cannot apply cfg.

Creating the group in etc/hostgroups.cfg did the trick ! Configuration applied several times with success ! Thanks a lot !