Wildcards in hostgroup definitions

Duncan Berriman duncan at dcl.co.uk
Thu Oct 21 18:56:47 CEST 2010


Looks ok to me  - my test was

define hostgroup{
        hostgroup_name  ALL-SERVERS ; The name of the hostgroup
        alias  ALL-SERVERS ; The name of the hostgroup
        hostgroup_members         .*
        }

That parses ok but I end up with nothing in the group when I look at the
nagios display.

If I use individual members it works and they appear in the nagios display.

Looks like it doesn't work at any rate. 

I just upgrade to the latest version as I was having issues with wildcards
but I think that was more down to my understanding. I've been trying to use
them for escalations. I think I finally got there (I think - time will tell)
but I had to add a lot of service groups to make it work the way I wanted.

Duncan

-----Original Message-----
From: olourkin-nagios at yahoo.com [mailto:olourkin-nagios at yahoo.com] 
Sent: 21 October 2010 17:07
To: Nagios Users List
Subject: Re: [Nagios-users] Wildcards in hostgroup definitions

Thanks for checking it out, Duncan.  Here are the config snippets to
illustrate the mystery:

define hostgroup {
        hostgroup_name          ecomUs
        alias                   ecom servers - US
        members                 .*
}

- This works.  We get an ecomUs hostgroup with all our hosts.


define hostgroup {
        hostgroup_name          ecomUs
        alias                    ecom servers - US
        hostgroup_members       .*
}

- This doesn't work.  We get this error after running a config verification:

 "Error: Could not find member group '.*' specified in hostgroup (config
file '/etc/nagios/conf.d/tier12/env-specific/vdev/hostgroup.d/ecomUs.cfg',
starting on line 7)."

Cheers,
Erik


----- Original Message ----
From: Duncan Berriman <duncan at dcl.co.uk>
To: Nagios Users List <nagios-users at lists.sourceforge.net>
Sent: Thu, October 21, 2010 2:11:44 AM
Subject: Re: [Nagios-users] Wildcards in hostgroup definitions

Hi Erik,

Appears to work just fine for me if I am testing your case correctly.

Perhaps you could post the config file (or snip of) that's causing the
issue.

Duncan

-----Original Message-----
From: olourkin-nagios at yahoo.com [mailto:olourkin-nagios at yahoo.com]
Sent: 20 October 2010 22:45
To: nagios-users at lists.sourceforge.net
Subject: [Nagios-users] Wildcards in hostgroup definitions

Hi all -

Got a mystery regarding the use of regex matching that I hope someone on the
listserv might clear.  We have the appropriate config options to use regex,
and 
it works just fine for the members directive - ie. "members    .*" expands
just
as we'd expect.  

But "hostgroup_members    .*" returns an error along the lines of "Could not

find member group '.*' specified in hostgroup....", leading us to believe
that Nagios is simply ignoring regex matching for the hostgroup_members
directive. 
Anyone know if we're off our rockers, or if Nagios really does handle things
this way?

Thanks,
Erik Larkin


----------------------------------------------------------------------------
--
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-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

--
This message has been scanned for viruses and dangerous content by
MailScanner, and is believed to be clean.


----------------------------------------------------------------------------
--
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-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


----------------------------------------------------------------------------
--
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-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

--
This message has been scanned for viruses and dangerous content by
MailScanner, and is believed to be clean.


------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-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