Page 1 of 1

Host group management - hosts are grayed out

Posted: Fri Jul 11, 2014 5:24 am
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.

Re: Host group management - hosts are grayed out

Posted: Fri Jul 11, 2014 12:52 pm
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?

Re: Host group management - hosts are grayed out

Posted: Sat Jul 12, 2014 7:49 am
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
}

Re: Host group management - hosts are grayed out

Posted: Mon Jul 14, 2014 11:39 am
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