Could not expand members specified in hostgroup (defined in cfg_dir)

Marc Powell marc at ena.com
Fri Jan 8 17:53:28 CET 2010


On Jan 8, 2010, at 10:01 AM, Jacob Anawalt wrote:

> I made a new cfg for my gecko server, gecko.cfg, and added it
> alongside localhost in hostgroups_nagios2.cfg, but when I tried to
> restart, nagios says:
> 
> Error: Could not find any host matching 'gecko' (config file
> '/etc/nagios3/conf.d/hostgroups_nagios2.cfg', starting on line 18)

> hostgroups_nagios2.cfg:
> ...
> define hostgroup {
>        hostgroup_name  http-servers
>                alias           HTTP servers
> # works/original
>                members         localhost
> # broken
> #                members         localhost,gecko
>        }

members are host_names. This should be 'localhost,gecko.domain.tld'. alias is generally just a more descriptive name for human consumption only.

> gecko.cfg:
> define host{
>        use                     generic-host
>        host_name               gecko.domain.tld
>        alias                   gecko
>        address                 nnn.nnn.nnn.nnn
> # added when hostgroup.members didn't work
>        hostgroups              http-servers
>        }


Personally I think this is a better, more scalable way of adding it to the hostgroup anyway.

--
Marc


------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list