Problem with regular expressions and hostgroup_name in a hostgroup definition

Jacobo García jacobo.garcia at the-cocktail.com
Fri Jan 25 13:17:34 CET 2008


I want to define several hostgroups (for many virtual hosts) that belong
to the same hostgroup called website:

define hostgroup{
        hostgroup_name   websites
        alias            All Web Sites
        hostgroup_members ^.*-websites$
        }

define hostgroup{
        hostgroup_name  voc-websites
        alias           Voc Web Sites
        }

define hostgroup{
        hostgroup_name  tck-websites
        alias           TCK Web Sites
        }


And then define a service that uses the parent hostgroup (website):

 define service{
        ; The 'name' of this service template, referenced in other
service definitions
        name                            sites-service
        use                             generic-service
        service_description             Sites-service
        is_volatile                     0
        check_period                    24x7
        max_check_attempts              4
        normal_check_interval           5
        retry_check_interval            1
        contact_groups                  admins
        notification_options            w,u,c,r
        notification_interval           960
        notification_period             24x7
        check_command                   check_http_path!/
        register                        0       ; DONT REGISTER THIS
DEFINITION - ITS NOT A REAL SERVICE, JUST A TEMPLATE!
        hostgroup_name                  websites
   }


Of course I have regexp enabled in nagios.cfg


# REGULAR EXPRESSION MATCHING
use_regexp_matching=0

# "TRUE" REGULAR EXPRESSION MATCHING
use_true_regexp_matching=1


But this setup does not work as intended, i get the following errors
when running:

$ sudo /usr/local/nagios/bin/nagios -v /etc/nagios3/nagios.cfg


Reading configuration data...

Error: Could not find any hostgroup matching '^.*-websites$' (config
file '/etc/nagios3/objects/main/hostgroups.cfg', starting on line 33)
Error: Could not expand member hosts specified in hostgroup (config file
'/etc/nagios3/objects/main/hostgroups.cfg', starting on line 33)

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


I am using nagios 3.0 rc1 compiled in ubuntu from sources as explained
in quickstart guide.

What I am missing?

Thanks for your time in advance



-- 
Jacobo García López de Araújo
jacobo.garcia at the-cocktail.com

The Cocktail
c/ Salamanca 17
28020 Madrid
+34 91 567 06 05

wwww > http://the-cocktail.com


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
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