<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Hi Paul,<br>
<br>
<br>
<br>
<br>
Nice ! I always work around this limitation of devmon by putting
all my snmp devices altogether in a single config file under
/etc/xymon/hosts.d/<br>
<br>
Maybe you could submit this patch to the devmon-devel mailing list
? Devmon project has been quite active over the last weeks, maybe
we'll get a new -beta- version one day...<br>
<br>
<br>
<br>
Cheers,<br>
Francois.<br>
<br>
<br>
Le 29/03/2016 18:16, Root, Paul T a écrit :<br>
</div>
<blockquote
cite="mid:C88055D0A02F174F848A984067ACC21C5BC6F193@podcwmbxex503.ctl.intranet"
type="cite">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 12 (filtered
medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal">Hi, <o:p></o:p></p>
<p class="MsoNormal"> I just reorganized my xymon
hosts.cfg to use directories to better organize my machines.
I completely forgot devmon –readbbhosts.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"> So I made a quick change to
dm_config.pm to pick up *.cfg files in directories.
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">*** dm_config.pm Tue Mar 29 10:35:58
2016<o:p></o:p></p>
<p class="MsoNormal">---
/usr/local/devmon/modules/dm_config.pm Fri Jan 23
09:41:27 2009<o:p></o:p></p>
<p class="MsoNormal">***************<o:p></o:p></p>
<p class="MsoNormal">*** 1267,1274 ****<o:p></o:p></p>
<p class="MsoNormal"> next FILEREAD;<o:p></o:p></p>
<p class="MsoNormal"> }<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">- # print "working on $bbfile\n";<o:p></o:p></p>
<p class="MsoNormal">- <o:p></o:p></p>
<p class="MsoNormal"> # Now interate through our file and
suck out the juicy bits<o:p></o:p></p>
<p class="MsoNormal"> FILELINE: while ( my $line=
<BBFILE> ) {<o:p></o:p></p>
<p class="MsoNormal"> chomp $line;<o:p></o:p></p>
<p class="MsoNormal">--- 1267,1272 ----<o:p></o:p></p>
<p class="MsoNormal">***************<o:p></o:p></p>
<p class="MsoNormal">*** 1287,1311 ****<o:p></o:p></p>
<p class="MsoNormal"> push @bbfiles, $file;<o:p></o:p></p>
<p class="MsoNormal"> }<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">- # Check for directory includes<o:p></o:p></p>
<p class="MsoNormal">- if($line =~
/^\s*(?:disp|net)?directory\s+(.+)$/i) {<o:p></o:p></p>
<p class="MsoNormal">- my $directory = $1;<o:p></o:p></p>
<p class="MsoNormal">- # Tack on our etc dir if
this isn’t an absolute path<o:p></o:p></p>
<p class="MsoNormal">- $directory =
"$etcdir/$directory" if $directory !~ /^\//;<o:p></o:p></p>
<p class="MsoNormal">- # print "reading
$directory\n";<o:p></o:p></p>
<p class="MsoNormal">- <o:p></o:p></p>
<p class="MsoNormal">- # Add the file to our
read array<o:p></o:p></p>
<p class="MsoNormal">- opendir (DIR, $directory)
|| warn "Cannot open $directory\n";<o:p></o:p></p>
<p class="MsoNormal">- my $file;<o:p></o:p></p>
<p class="MsoNormal">- while ($file =
readdir (DIR)) {<o:p></o:p></p>
<p class="MsoNormal">- # I name all
config files with a .cfg<o:p></o:p></p>
<p class="MsoNormal">- if (grep
(/\.cfg/, $file)) {<o:p></o:p></p>
<p class="MsoNormal">-
push @bbfiles, $directory . '/' . $file;<o:p></o:p></p>
<p class="MsoNormal">- }<o:p></o:p></p>
<p class="MsoNormal">- }<o:p></o:p></p>
<p class="MsoNormal">- close (DIR);<o:p></o:p></p>
<p class="MsoNormal">- }<o:p></o:p></p>
<p class="MsoNormal">- <o:p></o:p></p>
<p class="MsoNormal"> # Else see if this line matches
the ip/host bb-hosts format<o:p></o:p></p>
<p class="MsoNormal"> elsif($line =~
/^\s*(\d+\.\d+\.\d+\.\d+)\s+(\S+)(.*)$/i) {<o:p></o:p></p>
<p class="MsoNormal"> my ($ip, $host, $bbopts) = ($1,
$2, $3);<o:p></o:p></p>
<p class="MsoNormal">--- 1285,1290 ----<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Devmon version 0.3.1-beta1. <o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><b><span
style="font-family:"Arial","sans-serif";color:green">Paul
Root<o:p></o:p></span></b></p>
<p class="MsoNormal"><span
style="font-family:"Arial","sans-serif"">Lead
Engineer<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-family:"Arial","sans-serif"">CenturyLink
Network Reliability Operations Center<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-family:"Arial","sans-serif""><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-family:"Arial","sans-serif"">390
Commerce Dr<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-family:"Arial","sans-serif"">Woodbury,
MN 55125<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-family:"Arial","sans-serif"">Direct:
(651)312-5207<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-family:"Arial","sans-serif""><a class="moz-txt-link-abbreviated" href="mailto:Paul.Root@centurylink.com">Paul.Root@centurylink.com</a><o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></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>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Xymon mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Xymon@xymon.com">Xymon@xymon.com</a>
<a class="moz-txt-link-freetext" href="http://lists.xymon.com/mailman/listinfo/xymon">http://lists.xymon.com/mailman/listinfo/xymon</a>
</pre>
</blockquote>
<br>
</body>
</html>