<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META content="MSHTML 5.50.4926.2500" name=GENERATOR>
<STYLE>@font-face {
font-family: MS Mincho;
}
@font-face {
font-family: \@MS Mincho;
}
@page Section1 {size: 595.3pt 841.9pt; margin: 72.0pt 90.0pt 72.0pt 90.0pt; }
P.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"
}
LI.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"
}
DIV.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"
}
A:link {
COLOR: blue; TEXT-DECORATION: underline
}
SPAN.MsoHyperlink {
COLOR: blue; TEXT-DECORATION: underline
}
A:visited {
COLOR: purple; TEXT-DECORATION: underline
}
SPAN.MsoHyperlinkFollowed {
COLOR: purple; TEXT-DECORATION: underline
}
SPAN.EmailStyle17 {
COLOR: windowtext; FONT-FAMILY: Arial
}
DIV.Section1 {
page: Section1
}
</STYLE>
</HEAD>
<BODY lang=EN-GB vLink=purple link=blue>
<DIV><SPAN class=349080417-12082003><FONT face=Arial color=#0000ff size=2>It
seems that the check_traffic plugin is not parsing the snmpget properly and
causing it to report zero across the board</FONT></SPAN></DIV>
<DIV><SPAN class=349080417-12082003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=349080417-12082003><FONT face=Arial color=#0000ff
size=2>[root@nagios libexec]# ./check_traffic -H <HOSTNAME> -i 13 -b
12500000000 -r GigabitEthernet0/1 -w 95 -c 90<BR>Total RX Bytes: 0.00 MB, Total
TX Bytes: 0.00 MB<br>Average Traffic: 0.00 B/s (0.0%) in, 0.00 B/s (0.0%)
out</FONT></SPAN></DIV>
<DIV><SPAN class=349080417-12082003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=349080417-12082003><FONT face=Arial color=#0000ff size=2>But
when i use the snmpget funcion as defined in the perl script I am getting
results</FONT></SPAN></DIV>
<DIV><SPAN class=349080417-12082003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=349080417-12082003><FONT face=Arial color=#0000ff
size=2>[root@nagios libexec]# snmpget -v 1 <HOSTNAME> -c public
interfaces.ifTable.ifEntry.ifOutOctets.13
<BR>IF-MIB::ifOutOctets.13 = Counter32: 408708037<BR>[root@nagios libexec]#
snmpget -v 1 <HOSTNAME> -c public
interfaces.ifTable.ifEntry.ifInOctets.13 <BR>IF-MIB::ifInOctets.13 = Counter32:
1829853462</FONT></SPAN></DIV>
<DIV><SPAN class=349080417-12082003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=349080417-12082003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=349080417-12082003><FONT face=Arial color=#0000ff
size=2>Portion of perl script </FONT></SPAN></DIV>
<DIV><SPAN class=349080417-12082003><FONT face=Arial color=#0000ff size=2>$_ =
`$SNMPGET -v 1 $host_address -c $COMMUNITY
interfaces.ifTable.ifEntry.ifInOctets.$iface_number`;<BR> <BR>m/(\d*)\s$/;<BR>$in_bytes
= $1;<BR> <BR>$_ = `$SNMPGET -v 1 $host_address -c $COMMUNITY
interfaces.ifTable.ifEntry.ifOutOctets.$iface_number`;<BR> <BR>m/(\d*)\s$/;<BR>$out_bytes
= $1;</FONT></SPAN></DIV>
<DIV><SPAN class=349080417-12082003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=349080417-12082003><FONT face=Arial color=#0000ff size=2>So I
am guessing that the regex m/(\d*)\s$/ is wrong but I have never been good at
fixing these, so any wiz out there that could help me?</FONT></SPAN></DIV>
<DIV><SPAN class=349080417-12082003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=349080417-12082003><FONT face=Arial color=#0000ff
size=2>Thanks</FONT></SPAN></DIV>
<DIV><SPAN class=349080417-12082003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=349080417-12082003><FONT face=Arial color=#0000ff size=2>Alex
Georgopoulos</FONT></SPAN></DIV>
<DIV><SPAN class=349080417-12082003><FONT face=Arial color=#0000ff size=2>UAP
Server Administrator</FONT></SPAN></DIV>
<DIV><SPAN class=349080417-12082003><FONT face=Arial color=#0000ff size=2>Nagios
v1.1</FONT></SPAN></DIV>
<DIV><SPAN class=349080417-12082003><FONT face=Arial color=#0000ff
size=2>check_traffic plugin .90b</FONT></SPAN></DIV></BODY></HTML>