A question on using a wildcard in a hostgroup.cfg file
steve f
a31modela at hotmail.com
Wed Apr 13 20:29:03 CEST 2011
Gonna answer my own question. looks like if I do
.sa
it works.
Thanks,
Steve
From: a31modela at hotmail.com
To: nagios-users at lists.sourceforge.net
Date: Wed, 13 Apr 2011 11:36:18 -0400
Subject: [Nagios-users] A question on using a wildcard in a hostgroup.cfg file
I am trying to simplify my admin work for a large deployment we are doing right now of Nagios 3.2 Core in a SuSE Linux environment
I have multiple hostgroups set up and wanted to use a wildcard in the member name since all of the devices that will be in a hostgroup are named the same except for the actual location part of the name.
If I have each remote server listed explicitly ion the hostgroup file uder members, everything is fine.
I turned on use_true_regexp_matching and use_regexp_matching and added this to my hostgroup.cfg file:
define hostgroup{
hostgroup_name Remote_servers
alias Remote Servers
members *sa
}
I then did a verify of the nagios config & it replied with this:
Error: Could not find any host matching '*sa' (config file '/usr/local/nagios/etc/objects/hostgroups.cfg', starting on line 47)
Error: Could not expand members specified in hostgroup (config file '/usr/local/nagios/etc/objects/hostgroups.cfg', starting on line 47)
I tried multiple variations with wildcards both "?" and "*" to no avail.
If I STARTED the members list with the 1st couple of letters of the name of the hosts or just put only a " * " there, it works.
Can anyone explain why I cant do this
str*sa or str????sa or *sa but I can do str* or " * "
All of the hosts are named as such :
strXXXXsa - were XXXX is a 4 digit number for the server location
Thanks,
Steve
------------------------------------------------------------------------------
Forrester Wave Report - Recovery time is now measured in hours and minutes
not days. Key insights are discussed in the 2010 Forrester Wave Report as
part of an in-depth evaluation of disaster recovery service providers.
Forrester found the best-in-class provider in terms of services and vision.
Read this report now! http://p.sf.net/sfu/ibm-webcastpromo
_______________________________________________
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20110413/ab5ecfef/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
Forrester Wave Report - Recovery time is now measured in hours and minutes
not days. Key insights are discussed in the 2010 Forrester Wave Report as
part of an in-depth evaluation of disaster recovery service providers.
Forrester found the best-in-class provider in terms of services and vision.
Read this report now! http://p.sf.net/sfu/ibm-webcastpromo
-------------- next part --------------
_______________________________________________
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