<div dir="ltr"><div>Mike, i rewrite a bit your code and now it works for me :<br><br></div>(i use ^CLUSTER1^ instead of \"CLUSTER1\")<div><br>#!/usr/bin/perl<br><br>use strict;<br><br>my $var = $ARGV[0];<br>my $tmp;<br>
while ($var =~ /\^([^\^]+)\^/) {<br> $tmp = join('.', map(ord, split('', $1)));<br> my $length = length $1;<br> $var =~ s/\^$1\^/$length.$tmp/;<br> }<br><br>print "$var\n";<br>
<br># perl <a href="http://test.pl">test.pl</a> "1.3.6.1.4.1.9.9.254.1.2.5.1.3.1.^CLUSTER1^&1.3.6.1.4.1.9.9.254.1.2.5.1.3.1.^CLUSTER1_PREDICTOR^"<br>1.3.6.1.4.1.9.9.254.1.2.5.1.3.1.8.67.76.85.83.84.69.82.49&1.3.6.1.4.1.9.9.254.1.2.5.1.3.1.18.67.76.85.83.84.69.82.49.95.80.82.69.68.73.67.84.79.82<br>
</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-02-20 22:16 GMT+01:00 Steve Shipway <span dir="ltr"><<a href="mailto:s.shipway@auckland.ac.nz" target="_blank">s.shipway@auckland.ac.nz</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div link="blue" vlink="purple" lang="EN-NZ"><div><div class=""><p class="MsoNormal">Target[cluster1_test_failedconnections]: 1.3.6.1.4.1.9.9.254.1.2.5.1.3.1."CLUSTER1"&1.3.6.1.4.1.9.9.254.1.2.5.1.3.1."CLUSTER1_PREDICTOR":snmppub@10.0.99.161:::::2 <br>
<br><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u><u></u></span></p></div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">MRTG doesn’t do implicit table lookups or string expansion like this version of snmpwalk does. You will need to give the OID explicitly in the Target definition.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">While you can use certain suffixes to an OID to append the implicit index of an *<b>interface</b>* you cannot do this generally for any table. The backstroke you’re using is implying a following interface description to MRTG, which is causing the problems.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Steve<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Steve Shipway<u></u><u></u></span></b></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><a href="mailto:s.shipway@auckland.ac.nz" target="_blank">s.shipway@auckland.ac.nz</a><u></u><u></u></span></p>
<div><div><p class="MsoNormal"><u></u> <u></u></p></div></div></div></div></blockquote></div><br></div>