<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p style="margin-top:0;margin-bottom:0">Please help me too!</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<div>aburtssom01.auca.corp  <br>
aburtssom02.auca.corp  <br>
aburtssom03.auca.corp  <br>
aburtssom04.auca.corp  <br>
<br>
astptoemm01.auca.corp  <br>
</div>
<div><br>
aburtssom01.auca.corp  <br>
aburtssom02.auca.corp  <br>
aburtssom03.auca.corp  <br>
aburtssom04.auca.corp  <br>
</div>
<br>
<br>
<p style="margin-top:0;margin-bottom:0"><span><span>HOST=%((a(burt|scop)ssom0(1|2).auca.corp)|astptoemm01.auca.corp)</span></span></p>
<p style="margin-top:0;margin-bottom:0"><br>
<span></span></p>
<p style="margin-top:0;margin-bottom:0"><span><span>will this work?</span></span></p>
<p style="margin-top:0;margin-bottom:0"><span><br>
</span></p>
<p style="margin-top:0;margin-bottom:0"><span>and then how to I exclude it from a CLASS lower down?</span></p>
<p style="margin-top:0;margin-bottom:0"><span><br>
</span></p>
<p style="margin-top:0;margin-bottom:0"><span><span>CLASS=linux EXHOST=%*.auca.corp</span><br>
</span></p>
<p style="margin-top:0;margin-bottom:0"><br>
<span></span></p>
<p style="margin-top:0;margin-bottom:0">could I <br>
</p>
<p style="margin-top:0;margin-bottom:0"> </p>
<p style="margin-top:0;margin-bottom:0"><span><span>CLASS=linux EXHOST<span>=<span><span>%((a(burt|scop)ssom0(1|2).auca.corp)|astptoemm01.auca.corp)</span></span></span></span></span></p>
<p style="margin-top:0;margin-bottom:0"><span><span><span></span></span></span><br>
</p>
<div style="color: rgb(31, 28, 27);">
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b> Xymon <xymon-bounces@xymon.com> on behalf of Root, Paul T <Paul.Root@CenturyLink.com><br>
<b>Sent:</b> Monday, December 4, 2017 4:17 PM<br>
<b>To:</b> 'Mills,David (HHSC Contractor)'; xymon@xymon.com<br>
<b>Subject:</b> Re: [Xymon] HOST regex</font>
<div> </div>
</div>
<div link="blue" vlink="purple" lang="EN-US">
<div class="x_WordSection1">
<p class="x_MsoNormal"><font face="Calibri" size="2" color="#1f497d"><span style="font-size:11.0pt; color:#1F497D">Ah, I see, I was adding more machines with a , after the regex, but that’s treated as part of the regex, and the [] vs () for numbers.</span></font></p>
<p class="x_MsoNormal"><font face="Calibri" size="2" color="#1f497d"><span style="font-size:11.0pt; color:#1F497D"> </span></font></p>
<p class="x_MsoNormal"><font face="Calibri" size="2" color="#1f497d"><span style="font-size:11.0pt; color:#1F497D">Thanks,</span></font></p>
<p class="x_MsoNormal"><font face="Calibri" size="2" color="#1f497d"><span style="font-size:11.0pt; color:#1F497D">Paul.</span></font></p>
<p class="x_MsoNormal"><font face="Calibri" size="2" color="#1f497d"><span style="font-size:11.0pt; color:#1F497D"> </span></font></p>
<div>
<div style="border:none; border-top:solid #B5C4DF 1.0pt; padding:3.0pt 0in 0in 0in">
<p class="x_MsoNormal"><b><font face="Tahoma" size="2"><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; font-weight:bold">From:</span></font></b><font face="Tahoma" size="2"><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"">
 Mills,David (HHSC Contractor) [mailto:David.Mills@hhsc.state.tx.us] <br>
<b><span style="font-weight:bold">Sent:</span></b> Monday, December 04, 2017 2:56 PM<br>
<b><span style="font-weight:bold">To:</span></b> Root, Paul T; xymon@xymon.com<br>
<b><span style="font-weight:bold">Subject:</span></b> RE: HOST regex</span></font></p>
</div>
</div>
<p class="x_MsoNormal"><font face="Calibri" size="2"><span style="font-size:11.0pt"> </span></font></p>
<p class="x_MsoNormal"><font face="Calibri" size="2" color="#1f497d"><span style="font-size:11.0pt; color:#1F497D">Paul –</span></font></p>
<p class="x_MsoNormal"><font face="Calibri" size="2" color="#1f497d"><span style="font-size:11.0pt; color:#1F497D"> </span></font></p>
<p class="x_MsoNormal"><font face="Calibri" size="2" color="#1f497d"><span style="font-size:11.0pt; color:#1F497D">As far as just the Perl RE goes, use this:</span></font></p>
<p class="x_MsoNormal"><font face="Calibri" size="2" color="#1f497d"><span style="font-size:11.0pt; color:#1F497D"> </span></font></p>
<p class="x_MsoNormal"><font face="Calibri" size="2" color="#1f497d"><span style="font-size:11.0pt; color:#1F497D">(iadncmds[1-6])|(</span></font> iadccmds1[1-9]<font color="#1f497d"><span style="color:#1F497D">)|…
</span></font></p>
<p class="x_MsoNormal"><font face="Calibri" size="2" color="#1f497d"><span style="font-size:11.0pt; color:#1F497D"> </span></font></p>
<p class="x_MsoNormal"><font face="Calibri" size="2" color="#1f497d"><span style="font-size:11.0pt; color:#1F497D">So, in analysis.cfg: HOST=%(iadncmds[1-6])|(</span></font> iadccmds1[1-9]<font color="#1f497d"><span style="color:#1F497D">)| …   # Where the
 “|…” includes the rest of your hosts, following a similar pattern</span></font></p>
<p class="x_MsoNormal"><font face="Calibri" size="2" color="#1f497d"><span style="font-size:11.0pt; color:#1F497D"> </span></font></p>
<p class="x_MsoNormal"><font face="Calibri" size="2" color="#1f497d"><span style="font-size:11.0pt; color:#1F497D">Use “[]”s to specify a range of numbers, not parens…</span></font></p>
<p class="x_MsoNormal"><font face="Calibri" size="2" color="#1f497d"><span style="font-size:11.0pt; color:#1F497D"> </span></font></p>
<p class="x_MsoNormal"><font face="Calibri" size="2" color="#1f497d"><span style="font-size:11.0pt; color:#1F497D">$  perl -e 'for ($i = 0; $i <= 7; $i ++ ) { if ( "iadncmds$i" =~ /iadncmds[1-6]/ ) { print "This matches: iadncmds$i\n" } else { print "iadncmds$i
 does not match...\n" } }'</span></font></p>
<p class="x_MsoNormal"><font face="Calibri" size="2" color="#1f497d"><span style="font-size:11.0pt; color:#1F497D">iadncmds0 does not match...</span></font></p>
<p class="x_MsoNormal"><font face="Calibri" size="2" color="#1f497d"><span style="font-size:11.0pt; color:#1F497D">This matches: iadncmds1</span></font></p>
<p class="x_MsoNormal"><font face="Calibri" size="2" color="#1f497d"><span style="font-size:11.0pt; color:#1F497D">This matches: iadncmds2</span></font></p>
<p class="x_MsoNormal"><font face="Calibri" size="2" color="#1f497d"><span style="font-size:11.0pt; color:#1F497D">This matches: iadncmds3</span></font></p>
<p class="x_MsoNormal"><font face="Calibri" size="2" color="#1f497d"><span style="font-size:11.0pt; color:#1F497D">This matches: iadncmds4</span></font></p>
<p class="x_MsoNormal"><font face="Calibri" size="2" color="#1f497d"><span style="font-size:11.0pt; color:#1F497D">This matches: iadncmds5</span></font></p>
<p class="x_MsoNormal"><font face="Calibri" size="2" color="#1f497d"><span style="font-size:11.0pt; color:#1F497D">This matches: iadncmds6</span></font></p>
<p class="x_MsoNormal"><font face="Calibri" size="2" color="#1f497d"><span style="font-size:11.0pt; color:#1F497D">iadncmds7 does not match...</span></font></p>
<p class="x_MsoNormal"><font face="Calibri" size="2" color="#1f497d"><span style="font-size:11.0pt; color:#1F497D"> </span></font></p>
<p class="x_MsoNormal"><font face="Calibri" size="2" color="#1f497d"><span style="font-size:11.0pt; color:#1F497D"> </span></font></p>
<div>
<p class="x_MsoNormal"><font face="Courier New" size="2" color="#1f497d"><span style="font-size:10.0pt; font-family:"Courier New"; color:#1F497D"> </span></font></p>
<p class="x_MsoNormal"><font face="Courier New" size="2" color="#1f497d"><span style="font-size:10.0pt; font-family:"Courier New"; color:#1F497D">~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~</span></font></p>
<p class="x_MsoNormal"><font face="Times New Roman" size="2" color="#1f497d"><span style="font-size:11.0pt; font-family:"Times New Roman","serif"; color:#1F497D">David Mills<br>
Systems Administrator</span></font><font color="#1f497d"><span style="color:#1F497D"><br>
</span></font><b><i><font face="Times New Roman" color="#1f33ed"><span style="font-family:"Times New Roman","serif"; color:#1F33ED; font-weight:bold; font-style:italic">Northrop Grumman</span></font></i></b><font face="Times New Roman" color="#1f497d"><span style="font-family:"Times New Roman","serif"; color:#1F497D"><br>
(512) 595-1238 (mobile)</span></font></p>
</div>
<p class="x_MsoNormal"><font face="Calibri" size="2" color="#1f497d"><span style="font-size:11.0pt; color:#1F497D"> </span></font></p>
<div>
<div style="border:none; border-top:solid #E1E1E1 1.0pt; padding:3.0pt 0in 0in 0in">
<p class="x_MsoNormal"><b><font face="Calibri" size="2"><span style="font-size:11.0pt; font-weight:bold">From:</span></font></b> Xymon [<a href="mailto:xymon-bounces@xymon.com">mailto:xymon-bounces@xymon.com</a>]
<b><span style="font-weight:bold">On Behalf Of </span></b>Root, Paul T<br>
<b><span style="font-weight:bold">Sent:</span></b> Monday, December 4, 2017 2:46 PM<br>
<b><span style="font-weight:bold">To:</span></b> <a href="mailto:xymon@xymon.com">
xymon@xymon.com</a><br>
<b><span style="font-weight:bold">Subject:</span></b> [Xymon] HOST regex</p>
</div>
</div>
<p class="x_MsoNormal"><font face="Calibri" size="2"><span style="font-size:11.0pt"> </span></font></p>
<p class="x_MsoNormal"><font face="Calibri" size="2"><span style="font-size:11.0pt">I’m having trouble getting a regex going for hostnames in analysis.cfg</span></font></p>
<p class="x_MsoNormal"><font face="Calibri" size="2"><span style="font-size:11.0pt"> </span></font></p>
<p class="x_MsoNormal"><font face="Calibri" size="2"><span style="font-size:11.0pt">I’ve got machines   iadncmds1  through iadncmds6 and iadccmds1 through iadncmds9 and a couple other machines, all should/will have the same things to look at (ports, procs,
 etc).</span></font></p>
<p class="x_MsoNormal"><font face="Calibri" size="2"><span style="font-size:11.0pt"> </span></font></p>
<p class="x_MsoNormal"><font face="Calibri" size="2"><span style="font-size:11.0pt">I’ve tried the following:</span></font></p>
<p class="x_MsoNormal"><font face="Calibri" size="2"><span style="font-size:11.0pt">HOST=%iad(ncm|ccm)ds(1-9),apancmdsd1,iadncmdsd2</span></font></p>
<p class="x_MsoNormal"><font face="Calibri" size="2"><span style="font-size:11.0pt">HOST=%iad(ncm|ccm)ds\d,apancmdsd1,iadncmdsd2</span></font></p>
<p class="x_MsoNormal"><font face="Calibri" size="2"><span style="font-size:11.0pt">HOST=%iad(ncm|ccm)ds.*,apancmdsd1,iadncmdsd2</span></font></p>
<p class="x_MsoNormal"><font face="Calibri" size="2"><span style="font-size:11.0pt">HOST=%iad(ncm|ccm)ds(.*),apancmdsd1,iadncmdsd2</span></font></p>
<p class="x_MsoNormal"><font face="Calibri" size="2"><span style="font-size:11.0pt"> </span></font></p>
<p class="x_MsoNormal"><font face="Calibri" size="2"><span style="font-size:11.0pt">Any help here?</span></font></p>
<p class="x_MsoNormal"><font face="Calibri" size="2"><span style="font-size:11.0pt"> </span></font></p>
<p class="x_MsoNormal"><font face="Calibri" size="2"><span style="font-size:11.0pt">Thanks,</span></font></p>
<p class="x_MsoNormal"><font face="Calibri" size="2"><span style="font-size:11.0pt">Paul.</span></font></p>
<p class="x_MsoNormal"><font face="Calibri" size="2"><span style="font-size:11.0pt"> </span></font></p>
<p class="x_MsoNormal"><font face="Calibri" size="2"><span style="font-size:11.0pt"> </span></font></p>
<p class="x_MsoNormal" style="text-align:center" align="center"><font face="Times New Roman" size="3"><span style="font-size:12.0pt; font-family:"Times New Roman","serif"">This communication is the property of CenturyLink and may contain confidential or privileged
 information. Unauthorized use of this communication is strictly prohibited and may be unlawful. If you have received this communication in error, please immediately notify the sender by reply e-mail and destroy all copies of the communication and any attachments.</span></font></p>
</div>
<center>This communication is the property of CenturyLink and may contain confidential or privileged information. Unauthorized use of this communication is strictly prohibited and may be unlawful. If you have received this communication in error, please immediately
 notify the sender by reply e-mail and destroy all copies of the communication and any attachments.</center>
</div>
</div>
</div>
</body>
</html>