<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
Gonna answer my own question. looks like if I do<br><br>.sa <br><br>it works.<br><br>Thanks,<br><br>Steve<br><br><hr id="stopSpelling">From: a31modela@hotmail.com<br>To: nagios-users@lists.sourceforge.net<br>Date: Wed, 13 Apr 2011 11:36:18 -0400<br>Subject: [Nagios-users] A question on using a wildcard in a hostgroup.cfg file<br><br>
<meta http-equiv="Content-Type" content="text/html; charset=unicode">
<meta name="Generator" content="Microsoft SafeHTML">
<style>
.ExternalClass .ecxhmmessage P
{padding:0px;}
.ExternalClass body.ecxhmmessage
{font-size:10pt;font-family:Tahoma;}
</style>
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<br><br>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.<br><br>If I have each remote server listed explicitly ion the hostgroup file uder members, everything is fine.<br><br>I turned on use_true_regexp_matching and use_regexp_matching and added this to my hostgroup.cfg file:<br><br><strong>define hostgroup{<br><br> hostgroup_name Remote_servers<br><br> alias Remote Servers<br><br> members *sa<br><br><br> }<br><br></strong>I then did a verify of the nagios config & it replied with this:<br><br>Error: Could not find any host matching '*sa' (config file '/usr/local/nagios/etc/objects/hostgroups.cfg', starting on line 47)<br>Error: Could not expand members specified in hostgroup (config file '/usr/local/nagios/etc/objects/hostgroups.cfg', starting on line 47)<br><br>I tried multiple variations with wildcards both "?" and "*" to no avail.<br><br>If I <b>STARTED</b> the members list with the 1st couple of letters of the name of the hosts or just put only a " * " there, it works.<br><br>Can anyone explain why I cant do this <br><br>str*sa or str????sa or *sa but I can do str* or " * "<br><br>All of the hosts are named as such :<br><br>strXXXXsa - were XXXX is a 4 digit number for the server location<br><br><br>Thanks,<br><br>Steve<br><strong></strong>
<br>------------------------------------------------------------------------------
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<br>_______________________________________________
Nagios-users mailing list
Nagios-users@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 </body>
</html>