<html><div style='background-color:'><P>When you're refering to "two samples" are you refering to the two IODs for each target? Like: Target[$target_name]: $iod1&$iod2</P>
<P>Generally this would be in and out, but it doesn't have to be. You should use IODs that are the same type (Gauge, Counter64, Counter32, etc) and have the same units (Bytes, percent, etc) because you can't process one IOD differently than the other. If necessary use the same IOD twice. You can also use the noi or noo option (see docs).</P>
<P>I monitor multiple VPNs by walking them. I wrote a script to run cfgmaker against all my devices on a regular basis to pick up any changes made. Remember that a template file is just perl code that cfgmaker executes. The host template is executed once and the interface templated is executed for each interface that cfgmaker discovers. I have Netscreen & Juniper devices, so I wrote my own templates. There are some good Cisco templates on the web ... here's one I found, though it doesn't breat the tunnels down individually:</P>
<P><A href="http://mrtg.gvolk.com/template/host-ciscoipsecflow.template">http://mrtg.gvolk.com/template/host-ciscoipsecflow.template</A></P>
<P>Here's the approach I used:</P>
<P> </P>
<P>my @vpns;</P>
<P>my $snmpwalk = '/usr/bin/snmpwalk -v2c -c ';</P>
<P>foreach $line (`$snmpwalk $community $node .<FONT face=Arial size=2>1.3.6.1.4.1.9.9.171.1.2.3.1.1</FONT>`) {</P>
<P> $line =~ /\d+$/; </P>
<P> my $inst = $&; #get the instance value only</P>
<P> my $tmp = `$snmpget $community $node $iod`;</P>
<P> $tmp =~ /\S+$/;</P>
<P> my $vpn_name = $&;</P>
<P> #repeat above for ip, gateway, and any other info you want to display on your graph</P>
<P> push @vpns, [$inst, $vpn_name, etc..... ];</P>
<P>}</P>
<P>foreach my $vpn (@vpns) {</P>
<P>my $t1 = $vpn_throughput_oid . '.' . $vpn->[0];</P>
<P>my $t2 = $some other_oid . '.' . $vpn->[0];</P>
<P>my $tname = $router . '_VPN_' . $vpn->[1]</P>
<P>$target_lines .= ECHO<<;</P>
<P>Target[$tname]: $t1&$t2</P>
<P>Title[$tname]: $vpn->[1] Throughput</P>
<P>etc ........</P>
<P>ECHO</P>
<P>}<BR></P>
<P>There my be an easier way to do this, but this is the approach I used.<BR></P>
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #a0c6e5 2px solid; MARGIN-RIGHT: 0px"><FONT style="FONT-SIZE: 11px; FONT-FAMILY: tahoma,sans-serif">
<HR color=#a0c6e5 SIZE=1>
From: <I>"Ahmed Rafique" <Ahmed_Rafique@trimblems.com></I><BR>To: <I>"Craig Metzer" <ucantspamthis@hotmail.com>,<mrtg@lists.oetiker.ch></I><BR>Subject: <I>RE: [mrtg] How to monitor ipsec vpn in mrtg</I><BR>Date: <I>Thu, 29 Mar 2007 16:46:18 -0700</I><BR><BR>
<META content="Microsoft SafeHTML" name=Generator>
<STYLE>
.shape
{;}
</STYLE>
<STYLE>
</STYLE>
<STYLE>
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;margin-bottom:.0001pt;font-size:12.0pt;font-family:'Times New Roman';}
a:link, span.MsoHyperlink
{color:blue;text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;text-decoration:underline;}
p
{margin-right:0in;margin-left:0in;font-size:12.0pt;font-family:'Times New Roman';}
p.section1, li.section1, div.section1
{margin-right:0in;margin-left:0in;font-size:12.0pt;font-family:'Times New Roman';}
span.emailstyle18
{font-family:'Times New Roman';color:windowtext;font-weight:normal;font-style:normal;text-decoration:none none;}
span.emailstyle20
{font-family:'Times New Roman';color:navy;font-weight:normal;font-style:normal;text-decoration:none none;}
span.EmailStyle23
{font-family:'Times New Roman';color:navy;font-weight:normal;font-style:normal;text-decoration:none none;}
@page Section1
{size:8.5in 11.0in;margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
{page:Section1;}
ol
{margin-bottom:0in;}
ul
{margin-bottom:0in;}
</STYLE>
<DIV class=Section1>
<P class=MsoNormal><FONT face="Times New Roman" color=navy size=2><SPAN style="FONT-SIZE: 11pt; COLOR: navy">Hello Craig,</SPAN></FONT></P>
<P class=MsoNormal><FONT face="Times New Roman" color=navy size=2><SPAN style="FONT-SIZE: 11pt; COLOR: navy"></SPAN></FONT> </P>
<P class=MsoNormal><FONT face="Times New Roman" color=navy size=2><SPAN style="FONT-SIZE: 11pt; COLOR: navy">Thanks for the response.I do have couple of questions,</SPAN></FONT></P>
<OL style="MARGIN-TOP: 0in" type=1>
<LI class=MsoNormal style="COLOR: navy"><FONT face="Times New Roman" color=navy size=2><SPAN style="FONT-SIZE: 11pt">I know in MRTG I need to get two samples in orders to plot the graph. What two samples do I take in this case.</SPAN></FONT></LI>
<LI class=MsoNormal style="COLOR: navy"><FONT face="Times New Roman" color=navy size=2><SPAN style="FONT-SIZE: 11pt">I have multiple VPNs in that ASA . How can I monitor them ?</SPAN></FONT></LI></OL>
<P class=MsoNormal><FONT face="Times New Roman" color=navy size=2><SPAN style="FONT-SIZE: 11pt; COLOR: navy"></SPAN></FONT> </P>
<DIV>
<P class=section1><EM><I><FONT face="Times New Roman" color=navy size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy">T</SPAN></FONT></I></EM><EM><I><FONT face="Times New Roman" color=navy size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy">hanks and Regards,</SPAN></FONT></I></EM><I><FONT color=navy size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-STYLE: italic"><BR><EM><I><FONT face="Times New Roman">Ahmed Rafique</FONT></I></EM></SPAN></FONT></I><FONT face="Book Antiqua" color=navy size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Book Antiqua'"><BR></SPAN></FONT><EM><I><FONT face="Times New Roman" color=navy size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy"> </SPAN></FONT></I></EM></P></DIV>
<DIV>
<DIV class=MsoNormal style="TEXT-ALIGN: center" align=center><FONT face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt">
<HR align=center width="100%" SIZE=2>
</SPAN></FONT></DIV>
<P class=MsoNormal><B><FONT face=Tahoma size=2><SPAN style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">From:</SPAN></FONT></B><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma"> Craig Metzer [mailto:ucantspamthis@hotmail.com] <BR><B><SPAN style="FONT-WEIGHT: bold">Sent:</SPAN></B> Thursday, March 29, 2007 11:41 AM<BR><B><SPAN style="FONT-WEIGHT: bold">To:</SPAN></B> Ahmed Rafique; mrtg@lists.oetiker.ch<BR><B><SPAN style="FONT-WEIGHT: bold">Subject:</SPAN></B> RE: [mrtg] How to monitor ipsec vpn in mrtg</SPAN></FONT></P></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P>
<DIV>
<P><FONT face=Tahoma color=#3300ff size=2><SPAN style="FONT-SIZE: 10pt; COLOR: #3300ff; FONT-FAMILY: Tahoma">Ahmed,</SPAN></FONT></P>
<P><FONT face=Tahoma color=#3300ff size=2><SPAN style="FONT-SIZE: 10pt; COLOR: #3300ff; FONT-FAMILY: Tahoma">T</SPAN></FONT><FONT face=Arial color=navy size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">ry using OIDs on this tree: .1.3.6.1.4.1.9.9.171.1.2.1</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"></SPAN></FONT> </P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">You can look at the different VPN objects in Cisco’s SNMP Object Browser:</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"></SPAN></FONT> </P>
<P class=MsoNormal><SPAN class=a><FONT face=Arial color=black size=2><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial"><A href="http://tools.cisco.com/Support/SNMP/public.jsp"><FONT color=#606420><SPAN style="COLOR: #606420">http://tools.</SPAN></FONT><B><FONT color=#606420><SPAN style="FONT-WEIGHT: bold; COLOR: #606420">cisco</SPAN></FONT></B><FONT color=#606420><SPAN style="COLOR: #606420">.com/Support/</SPAN></FONT><B><FONT color=#606420><SPAN style="FONT-WEIGHT: bold; COLOR: #606420">SNMP</SPAN></FONT></B><FONT color=#606420><SPAN style="COLOR: #606420">/public.jsp</SPAN></FONT></A></SPAN></FONT><FONT color=black><SPAN style="COLOR: black"></SPAN></FONT></SPAN></P>
<P class=MsoNormal><SPAN class=a><FONT face=Arial color=black size=2><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial"></SPAN></FONT></SPAN> </P>
<P><SPAN class=a><FONT face=Arial color=black size=2><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial">What I do is write a script to walk the Tunnel Index: 1.3.6.1.4.1.9.9.171.1.2.3.1.1 and then loop through all the instances to build the respective graphs for whichever measurement you want to make. You can do all that in the host template.</SPAN></FONT></SPAN></P>
<P><FONT face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P>
<P><SPAN class=a><FONT face=Arial color=black size=2><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial">Craig</SPAN></FONT></SPAN></P>
<P><FONT face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P>
<BLOCKQUOTE style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 4pt; PADDING-BOTTOM: 0in; MARGIN: 5pt 0in 5pt 3.75pt; BORDER-LEFT: #a0c6e5 1.5pt solid; PADDING-TOP: 0in; BORDER-BOTTOM: medium none">
<DIV class=MsoNormal style="TEXT-ALIGN: center" align=center><FONT face=Tahoma size=1><SPAN style="FONT-SIZE: 8.5pt; FONT-FAMILY: Tahoma">
<HR align=center width="100%" color=#a0c6e5 noShade SIZE=1>
</SPAN></FONT></DIV>
<P class=MsoNormal style="MARGIN-BOTTOM: 12pt"><FONT face=Tahoma size=1><SPAN style="FONT-SIZE: 8.5pt; FONT-FAMILY: Tahoma">From: <I><SPAN style="FONT-STYLE: italic">"Ahmed Rafique" <Ahmed_Rafique@trimblems.com></SPAN></I><BR>To: <I><SPAN style="FONT-STYLE: italic"><mrtg@lists.oetiker.ch></SPAN></I><BR>Subject: <I><SPAN style="FONT-STYLE: italic">[mrtg] How to monitor ipsec vpn in mrtg</SPAN></I><BR>Date: <I><SPAN style="FONT-STYLE: italic">Thu, 29 Mar 2007 11:24:43 -0700</SPAN></I></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Times New Roman" color=navy size=2><SPAN style="FONT-SIZE: 11pt; COLOR: navy">Does anyone know how to monitor ipsec vpn in mrtg? The vpn is terminating on a Cisco asa 5510. I can monitor other interfaces of the asa but not the vpn. Any help will be appreciated.</SPAN></FONT></P>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P>
<DIV>
<P class=section1 style="MARGIN-BOTTOM: 12pt"><EM><I><FONT face="Times New Roman" color=navy size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy">Thanks and Regards,</SPAN></FONT></I></EM><I><FONT color=navy size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-STYLE: italic"><BR><EM><I><FONT face="Times New Roman">Ahmed Rafique</FONT></I></EM></SPAN></FONT></I></P></DIV>
<DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P></DIV>
<P class=MsoNormal><FONT face=Tahoma size=1><SPAN style="FONT-SIZE: 8.5pt; FONT-FAMILY: Tahoma"></SPAN></FONT> </P>
<P><FONT face=Tahoma size=1><SPAN style="FONT-SIZE: 8.5pt; FONT-FAMILY: Tahoma">>_______________________________________________<BR>>mrtg mailing list<BR>>mrtg@lists.oetiker.ch<BR>>https://lists.oetiker.ch/cgi-bin/listinfo/mrtg</SPAN></FONT></P></BLOCKQUOTE></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt"><BR clear=all></SPAN></FONT></P>
<DIV class=MsoNormal style="TEXT-ALIGN: center" align=center><FONT face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt">
<HR align=center width="100%" SIZE=2>
</SPAN></FONT></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt"><A href="http://g.msn.com/8HMBENUS/2752??PS=47575">Mortgage refinance is hot 1) Rates near 30-yr lows 2) Good credit get intro-rate 4.625%*</A> </SPAN></FONT></P></DIV><BR></FONT></BLOCKQUOTE></div><br clear=all><hr> <a href="http://g.msn.com/8HMBENUS/2755??PS=47575" target="_top">The average US Credit Score is 675. The cost to see yours: $0 by Experian.</a> </html>