<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:PMingLiU;
panose-1:2 2 5 0 0 0 0 0 0 0;}
@font-face
{font-family:PMingLiU;
panose-1:2 2 5 0 0 0 0 0 0 0;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:"\@PMingLiU";
panose-1:2 2 5 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
{mso-style-priority:99;
mso-style-link:"Plain Text Char";
margin:0cm;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Arial","sans-serif";
font-weight:bold;}
span.PlainTextChar
{mso-style-name:"Plain Text Char";
mso-style-priority:99;
mso-style-link:"Plain Text";
font-family:"Arial","sans-serif";
font-weight:bold;}
span.EmailStyle19
{mso-style-type:personal;
font-family:"Arial","sans-serif";
color:windowtext;
font-weight:bold;}
span.EmailStyle20
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
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]--></head><body lang=EN-NZ link="#0563C1" vlink="#954F72"><div class=WordSection1><p class=MsoNormal><span style='color:#1F497D'>The OID you are monitoring, </span><span lang=EN-US>1.3.6.1.4.1.161.19.3.3.2.2.0</span><span style='color:#1F497D'>, needs to be there twice. A MRTG Target *<b>ALWAYS</b>* has two metrics, even if one of them is not used or displayed. Try this:<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Target[10.10.5.5-color code]: 1.3.6.1.4.1.161.19.3.3.2.2.0&pseudoZero:Canopy@10.10.5.5:161::::2</span><span style='color:#1F497D'><o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>This sets the second metric to be always zero. You could, of course, use the initial OID twice, or add a different one.<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>Secondly, it is not clear what this OID returns. If it returns anything but a number, then you will need to convert it to a number somehow in order to graph it. The only way to do that is by using the <b>ConversionCode</b> directive; you write a small Perl conversion function in a file, declare the file using ConversionCode, then pipe the returned values to the function, similar to this:<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>ConversionCode: myfile.pl<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Target[10.10.5.5-color code]: 1.3.6.1.4.1.161.19.3.3.2.2.0:Canopy@10.10.5.5:161::::2|myfunction</span><span style='color:#1F497D'><o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>This of course assumes the file myfile.pl has been created, and defined the function myfunction() which takes on parameter and returns a number. See the MRTG documentation for details <a href="http://oss.oetiker.ch/mrtg/doc/mrtg-reference.en.html">http://oss.oetiker.ch/mrtg/doc/mrtg-reference.en.html</a> <o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>Steve<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><div><p class=MsoNormal><b><span style='color:#1F497D'>Steve Shipway<o:p></o:p></span></b></p><p class=MsoNormal><span style='font-size:10.0pt;color:#1F497D'><a href="mailto:s.shipway@auckland.ac.nz"><span style='color:blue'>s.shipway@auckland.ac.nz</span></a><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:1.0pt;color:#1F497D'>(GNU Terry Pratchett)<o:p></o:p></span></p></div><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><div style='border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt'><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> mrtg [mailto:mrtg-bounces+s.shipway=auckland.ac.nz@lists.oetiker.ch] <b>On Behalf Of </b>Rick Silacci<br><b>Sent:</b> Wednesday, 29 April 2015 7:19 a.m.<br><b>To:</b> mrtg@lists.oetiker.ch<br><b>Subject:</b> [mrtg] Trying to monitor Canopy Color Code<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoPlainText><span lang=EN-US style='font-weight:normal'>This is what I have in my config file: </span><span lang=EN-US>Target[10.10.5.5-color code]: 1.3.6.1.4.1.161.19.3.3.2.2.0:Canopy@10.10.5.5:161::::2<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US><o:p> </o:p></span></p><p class=MsoPlainText><span lang=EN-US>Getting error message that 1.3.6.1.4.1.161.19.3.3.2.2.0 does not make sense. Instead of an OID is there a variable for Color code?<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US><o:p> </o:p></span></p><p class=MsoPlainText><span lang=EN-US><o:p> </o:p></span></p><p class=MsoPlainText><span lang=EN-US>TX<o:p></o:p></span></p><p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif"'><o:p> </o:p></span></b></p><p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif"'><o:p> </o:p></span></b></p></div></div></body></html>