Page 1 of 1

remove host group

Posted: Tue Jun 07, 2016 2:37 pm
by khoanguyen
Hello Nagios support,
we have Nagios core version 3.3.1
We have a host group Inside host groups tab, we would like to delete that host group table, which include about 200 hosts.
What are the files i need to modify. I modified the host.cfg, hostgroups.cfg but not chnage is not effective .
Could you help, please.

Thank you

Khoa Nguyen

Re: remove host group

Posted: Tue Jun 07, 2016 3:04 pm
by rkennedy
Since you're using Nagios Core, it really depends how your environment was setup. After deleting the host group from your configuration files, you'll need to run service nagios restart to have the changes take effect.

Re: remove host group

Posted: Tue Jun 07, 2016 3:21 pm
by khoanguyen
i was aware of restarting Nagios, but my concerne is not deleting the host , Inside host.cfg file
I want to delete the host group, which gather all the hosts in that TAB, and the tab calls HOST GROUP.

Thank you and Brgds

Re: remove host group

Posted: Tue Jun 07, 2016 3:23 pm
by eloyd
You can find where it's defined by looking at /usr/local/nagios/etc. Here's what I'd do, assuming your group name is ERICISGREAT:

Code: Select all

egrep -r "hostgroup_name.*ERICISGREAT" /usr/local/nagios/etc/*
It will show you where the hostgroup is defined.

Re: remove host group

Posted: Tue Jun 07, 2016 3:28 pm
by khoanguyen
i am attaching a snap here so you can view the situation

Re: remove host group

Posted: Tue Jun 07, 2016 4:45 pm
by lmiltchev
Let's clarify - you would like to remove the "AIX - Non_production" hostgroup, correct? Have you tried grepping for it to see where it is defined?

Code: Select all

grep -r -i "aix - non_production" /usr/local/nagios/etc/

Re: remove host group

Posted: Wed Jun 08, 2016 9:08 am
by eloyd
Or, as I suggested, to find where it is defined (slightly modified, now that I know what group to look for):

Code: Select all

egrep -ir "hostgroup_name.*AIX - Non_production" /usr/local/nagios/etc/*

Re: remove host group

Posted: Wed Jun 08, 2016 3:28 pm
by tmcdonald
@khoanguyen keep us posted!