Page 2 of 3
Re: Removed host groups - Can't apply Config
Posted: Wed Jul 17, 2013 11:21 am
by slansing
This may be because you have assigned the hosts to the hostgroups and not the other way around, if a object is linked to another one direction, it will be greyed out when trying to add them from the other end. Are you still receiving configuration errors?
Re: Removed host groups - Can't apply Config
Posted: Wed Jul 17, 2013 11:28 am
by jbennett
They aren't greyed out and I'm not getting any config errors any more.
Re: Removed host groups - Can't apply Config
Posted: Wed Jul 17, 2013 11:50 am
by lmiltchev
Just to clarify...
When you go to:
CCM->Hosts->...->Modify->Manage Hostgroups
you don't see any of the hostgroups you would like to remove listed?
...and if you go to:
CCM->Host Groups->...->Modify->Manage Hosts
you don't see any hosts (members), assigned to this hostgroup?
Is this correct?
Re: Removed host groups - Can't apply Config
Posted: Wed Jul 17, 2013 12:43 pm
by jbennett
That is correct.
But the host group is clearly listed in the host config file when I check there.
If I check the hostgroup.cfg file, the host groups are listed, but no hosts are listed.
I should note that when I check the host group via the host, some of the host groups that were there to begin with, that were never deleted, are greyed out but are not listed on the right under 'Assigned'.
Re: Removed host groups - Can't apply Config
Posted: Wed Jul 17, 2013 4:33 pm
by abrist
jbennett wrote:
I should note that when I check the host group via the host, some of the host groups that were there to begin with, that were never deleted, are greyed out but are not listed on the right under 'Assigned'.
If the hostgroups are greyed out in a host's management interface, then the hostgroup was added to the host from either the hostgroup configuration or from another hostgroup that is a member of the hostgroup in question. Ir you may have a ghost config . . . .
List the hosts directory sorted by date. If any files are noticeably older, you may have some ghosted configs:
Code: Select all
ls -lat /usr/local/nagios/etc/hosts
Re: Removed host groups - Can't apply Config
Posted: Thu Jul 18, 2013 9:18 am
by jbennett
I have a number of configs that are from Oct. 19, 2012, but those are not the hosts in question. I also have a number that are from Jul 9, 2013 that should be disabled.
I'm not sure I follow how to resolve this once I've identified the host configs?
Re: Removed host groups - Can't apply Config
Posted: Thu Jul 18, 2013 11:46 am
by abrist
Usually, the best course of action is to remove those old files. Do note, that you may want to move them or rename them first as there is a change a portion of your config may rely on one or more of the ghost in order to pass verification.
Repeat the line below for each old config (replacing </path/to/old/config/file> with the actual path of course):
Code: Select all
mv </path/to/old/config/file> /tmp/old_configs
Then, go to the CMM --> Configure --> Core Config Manager --> Tools --> Write Config Files --> Click "Write" and then "Verify". If everything verifies OK, you may now apply configuration. If you get errors, you must resolve them before you apply config or restart nagios as doing so will possibly rewrite the old configs back to the config directories. Please rewrite and reverify after resolving errors to see if there are any more.
Re: Removed host groups - Can't apply Config
Posted: Fri Jul 19, 2013 9:44 am
by jbennett
I have done this, but I still have a number of disabled hosts that are showing up as being down. While it is true that those hosts are down, I no longer need the host check as I have a service check that it being done via NRDS for the host status that is far more reliable.
These hosts were assigned to a host group. I cannot remove thoses hosts from the host group, even after following the suggested methods below since they don't ever show up.
I'm not sure that I should remove the configs (move or rename them even) that are from July 9th as I'm not looking to completely delete the configs just yet. I just want Nagios to stop checking them (check_icmp) for the time being.
In short - it appears that even though I have the hosts deactivated, they are still active somehow due to being a part of a host group that was deleted, then added back. I cannot remove the host from the host group as it doesn't show up in the Nagios interface, only when checking the host .cfg file.
Re: Removed host groups - Can't apply Config
Posted: Fri Jul 19, 2013 10:44 am
by slansing
As far as stoping them from checking, you could as was mentioned "deactivate them" via the CCM, or you could disable active/passive checks on a host by host basis in it's details > advanced tab page.
Re: Removed host groups - Can't apply Config
Posted: Fri Jul 19, 2013 11:00 am
by jbennett
That's what i'm saying. I have deactivated them via the CCM, yet they're still showing up.