remove host group

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
khoanguyen
Posts: 3
Joined: Mon May 30, 2016 3:01 pm

remove host group

Post 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
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: remove host group

Post 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.
Former Nagios Employee
khoanguyen
Posts: 3
Joined: Mon May 30, 2016 3:01 pm

Re: remove host group

Post 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
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: remove host group

Post 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.
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
khoanguyen
Posts: 3
Joined: Mon May 30, 2016 3:01 pm

Re: remove host group

Post by khoanguyen »

i am attaching a snap here so you can view the situation
Attachments
nagios1.png
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: remove host group

Post 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/
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: remove host group

Post 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/*
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: remove host group

Post by tmcdonald »

@khoanguyen keep us posted!
Former Nagios employee
Locked