Host group management - hosts are grayed out

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
sureshkraj2012
Posts: 65
Joined: Tue Aug 06, 2013 11:06 pm

Host group management - hosts are grayed out

Post by sureshkraj2012 »

Hello,

There is a hostgroup named "Linux servers" and it shows only 3 (server1.domain.com,server2.domain.com,server3.domain.com) members in /usr/local/nagios/etc/hostgroups.cfg file. But when we checked in Home -> Hostgroup overview it shows several hosts for that hostgroup.
However, CCM -> Monitoring -> Host Groups shows only 3 servers and rest of the few hosts grayed out. Not sure why this discrepancy between GUI and cfg file?
Due to this we were not able apply configuration. Any help would be much appreciated?

define hostgroup {
hostgroup_name Linux Servers
alias Linux Servers
members server1.domain.com, server2.domain.com,server3.domain.com
}

Apply config error
---------------------

Error: Could not expand members specified in hostgroup (config file '/usr/local/nagios/etc/hostgroups.cfg', starting on line 141)
Error processing object config files!


***> One or more problems was encountered while processing the config files...

Check your configuration file(s) to ensure that they contain valid
directives and data defintions. If you are upgrading from a previous
version of Nagios, you should be aware that some variables/definitions
may have been removed or modified in this version. Make sure to read
the HTML documentation regarding the config files, as well as the
'Whats New' section to find out what has changed.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Host group management - hosts are grayed out

Post by lmiltchev »

What do you have on line 141 in '/usr/local/nagios/etc/hostgroups.cfg'? Have you deleted any of the hosts, members of "Linux Servers" hostgroup?
Be sure to check out our Knowledgebase for helpful articles and solutions!
sureshkraj2012
Posts: 65
Joined: Tue Aug 06, 2013 11:06 pm

Re: Host group management - hosts are grayed out

Post by sureshkraj2012 »

No. We haven't deleted any host in that hostgroup.
In GUI, it originally shows 8 hosts. Below is the content of line 141

define hostgroup {
hostgroup_name Linux Servers
alias Linux Servers
members server1.domain.com, server2.domain.com,server3.domain.com
}
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Host group management - hosts are grayed out

Post by lmiltchev »

Do you have any "ghost" hosts? Check the timestamps of the configs in the "hosts" directory:

Code: Select all

ll -t /usr/local/nagios/etc/hosts
Do you have any "old" configs (configs that are not updating)? If you have "ghosts" you will need to remove them manually from the CLI. Read more on the "ghosts" hosts/services here:

http://support.nagios.com/wiki/index.ph ... t_Hosts.29
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked