Page 1 of 1

Delete all empty hostgroup or servicegroups Nagios Core

Posted: Fri Apr 30, 2021 12:59 am
by jwassouf
Hi All,

We are currently using NagiosĀ® Coreā„¢ Version 4.4.5 and we are using NagiosQL 3.4.1 to help us manage and configure our config checks.

Our hostgroup or servicegroups is very messy at the moment and I am looking to clean things up, currently I am looking to delete all empty configs that have nothing attached to them at all.

Is there a way to list all empty hostgroup or servicegroups? maybe an API or query that I can use?

Thank you in advance.

Re: Delete all empty hostgroup or servicegroups Nagios Core

Posted: Fri Apr 30, 2021 11:20 am
by benjaminsmith
Hi,

Thanks for contacting the Nagios Support Team. This forum is for Nagios XI, however, you can post your question to the Nagios Community Forum for help. at:

https://support.nagios.com/forum/viewforum.php?f=7

Best Regards,
Benjamin

Re: Delete all empty hostgroup or servicegroups Nagios Core

Posted: Fri Apr 30, 2021 11:20 am
by gsmith
Hi,

Go to /usr/local/nagios/etc and take a look at:
servicegroups.cfg
hostgroups.cfg

You could copy them to /tmp or download them so you could edit
them in order to keep track of the changes you make via the gui.

Thanks