Cannot add host to host group

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
sal@coned
Posts: 72
Joined: Thu Jan 21, 2010 4:42 pm

Cannot add host to host group

Post by sal@coned »

I am running Nagios XI 2009R1.3F. Any time I try to add a host to a host group the configuration does not stick. The same issue presents itself when removing a host from a group. I am saving and applying the configuration in both instances.
tonyyarusso
Posts: 1128
Joined: Wed Mar 03, 2010 12:38 pm
Location: St. Paul, MN, USA
Contact:

Re: Cannot add host to host group

Post by tonyyarusso »

I'm running through a fresh installation to see if I can reproduce this - will report back shortly.
Tony Yarusso
Technical Services
___
TIES
Web: http://ties.k12.mn.us/
tonyyarusso
Posts: 1128
Joined: Wed Mar 03, 2010 12:38 pm
Location: St. Paul, MN, USA
Contact:

Re: Cannot add host to host group

Post by tonyyarusso »

Well, something's definitely broken. The odd thing though is that it still seems to write out a correct config for Nagios, so things show up properly in the status interface, but not within the CCM.
Tony Yarusso
Technical Services
___
TIES
Web: http://ties.k12.mn.us/
tonyyarusso
Posts: 1128
Joined: Wed Mar 03, 2010 12:38 pm
Location: St. Paul, MN, USA
Contact:

Re: Cannot add host to host group

Post by tonyyarusso »

Okay, here's what I'm seeing:

Under Host Management in the CCM, select "Modify" for a particular host (let's call it Ernie). Open the selector for host groups it should belong to and assign one (say, Round Heads). Save that, save the host, and apply configuration. Now look at the Hostgroup Grid in the status area. The host will show up in the group you added it to correctly.

Back in the CCM, under Host Group Management, select "Modify" for a group (say, Pointy Heads). Open the select members dialog and assign one (Bert). Save that, save the group, and apply configuration. Now look at the Hostgroup Grid under status again. The host you just added will properly appear in a hostgroup, as will the one you added in the other step.

Now for the weird part. Go back to Host Group Management, and go into the modify dialog for the first group (Round Heads), and look at the members list. Ernie will not show up on this list. Go back to Host Management and look at Ernie. It will show it as a member of Round heads. Look at Bert. Pointy Heads will not show up in his groups list. Look at Pointy Heads under Group Management. Bert is still there.

In short, things will only show up in the CCM under the same place where you added them. However, both types get read from and amalgamated to make the actual Nagios configuration, so what shows up in the status area appears correct.

sal, is this what you are experiencing, or do you see a different issue?
Tony Yarusso
Technical Services
___
TIES
Web: http://ties.k12.mn.us/
sal@coned
Posts: 72
Joined: Thu Jan 21, 2010 4:42 pm

Re: Cannot add host to host group

Post by sal@coned »

I can't get past the first step you listed. When I try to add\remove a host from the group it doesn't look like the Nagios config is being updated properly. I can go and manually remove the host via the config and it will show up properly in CCM.
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Cannot add host to host group

Post by mguthrie »

Is the 'Apply Configuration' failing, or is it showing successful and then the change isn't visible?

If the Apple Configuration is failing, you can check where the error is in the configuration snapshot, (use the text file with the zip file to track down the issue).
If the Apply is succeeding, have you tried using the Write Config tool in the Core Config Manager to manually write out the configuration files from the CCM?

Just for clarity can you elaborate the steps you're taking when you said the following:
I can go and manually remove the host via the config and it will show up properly in CCM.
sal@coned
Posts: 72
Joined: Thu Jan 21, 2010 4:42 pm

Re: Cannot add host to host group

Post by sal@coned »

Sorry it took me so long to get back to you.

I went into "Core Config Manager"
Select "Hosts"
Select host "server1" (this host belongs to a group called DMZ_HOSTS)
Removed the "DMZ_HOSTS" from the host groups
Saved the host configuration
Applied "Apply Configuration"

it comes back with "Success! Nagios Core was restarted with an updated configuration."

When I go back into the host config the host group is still there.

Hope this makes sense.
Sal
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Cannot add host to host group

Post by mguthrie »

That is strange, and we'll see if we can recreate that on this end.

Do your results differ when you do the following?:
Go to Core Config Manager-> Host Groups->(your host group), and then you remove that host as a member, save, and Apply Configuration.

I'm curious if there could be a glitch in the hosts page specifically, or if the issue is somewhere else. Also, can you make sure that the permissions in your /usr/local/nagios/etc and /usr/local/nagios/etc/hosts directory are set to "apache nagios."
sal@coned
Posts: 72
Joined: Thu Jan 21, 2010 4:42 pm

Re: Cannot add host to host group

Post by sal@coned »

I tested adding and removing a host from the host group and that works fine.
The issue seems to be only in removing host-groups from the host config.

However, after adding and removing the host from the host-group the original issue seems to have gone away.

I am considering this issue closed and will create a new post if the issue comes up again.

Thanks for the help
Sal
tonyyarusso
Posts: 1128
Joined: Wed Mar 03, 2010 12:38 pm
Location: St. Paul, MN, USA
Contact:

Re: Cannot add host to host group

Post by tonyyarusso »

All right - I wish we could have figured out better why there was an issue, but glad it seems to have resolved itself!
Tony Yarusso
Technical Services
___
TIES
Web: http://ties.k12.mn.us/
Locked