diff options
-rw-r--r-- | CHANGES | 2 | ||||
-rw-r--r-- | lib/Smokeping/probes/CiscoRTTMonEchoICMP.pm | 41 |
2 files changed, 19 insertions, 24 deletions
@@ -1,3 +1,5 @@ +* bugfix for CiscoRTTMonEchoICMP packetsize variable + -- niko, from Sam Stickland <sam_ml *spacething.org> * tune DS properties min/max/heartbeat instead of just complaing about them not matching (tobi) diff --git a/lib/Smokeping/probes/CiscoRTTMonEchoICMP.pm b/lib/Smokeping/probes/CiscoRTTMonEchoICMP.pm index f763fde..c542ed1 100644 --- a/lib/Smokeping/probes/CiscoRTTMonEchoICMP.pm +++ b/lib/Smokeping/probes/CiscoRTTMonEchoICMP.pm @@ -92,8 +92,7 @@ sub new($$$) sub ProbeDesc($){ my $self = shift; - my $bytes = $self->{properties}{packetsize}; - return "CiscoRTTMonEchoICMP ($bytes Bytes)"; + return "CiscoRTTMonEchoICMP"; } sub pingone ($$) { @@ -102,7 +101,7 @@ sub pingone ($$) { my $pings = $self->pings($target) || 20; my $tos = $target->{vars}{tos}; - my $bytes = $target->{properties}{packetsize}; + my $bytes = $target->{vars}{packetsize}; # use the proces ID as as row number to make this poll distinct on the router; my $row=$$; @@ -260,27 +259,6 @@ sub DestroyData ($$) { &snmpset($host, "rttMonCtrlAdminStatus.$row", 'integer', 6); } -sub probevars { - my $class = shift; - return $class->_makevars($class->SUPER::probevars, { - packetsize => { - _doc => <<DOC, -The packetsize parameter lets you configure the packetsize for the pings -sent. The minimum is 8, the maximum 16392. Use the same number as with -fping, if you want the same packet sizes being used on the network. -DOC - _default => 56, - _re => '\d+', - _sub => sub { - my $val = shift; - return "ERROR: packetsize must be between 8 and 16392" - unless $val >= 8 and $val <= 16392; - return undef; - }, - }, - }); -} - sub targetvars { my $class = shift; return $class->_makevars($class->SUPER::targetvars, { @@ -315,6 +293,21 @@ corresponds to a DSCP value 40 and a Precedence value of 5. The RTTMon MIB versions before IOS 12.0(3)T didn't support this parameter. DOC }, + packetsize => { + _doc => <<DOC, +The packetsize parameter lets you configure the packetsize for the pings +sent. The minimum is 8, the maximum 16392. Use the same number as with +fping, if you want the same packet sizes being used on the network. +DOC + _default => 56, + _re => '\d+', + _sub => sub { + my $val = shift; + return "ERROR: packetsize must be between 8 and 16392" + unless $val >= 8 and $val <= 16392; + return undef; + }, + }, }); } |