-
Notifications
You must be signed in to change notification settings - Fork 53
Open
Description
I needed to add this for the performance output to work, even after setting the octetlength to 65535:
--- check_netint.pl.20131104 2013-11-04 17:24:06.000000000 +0100
+++ check_netint.pl 2013-11-04 17:24:14.000000000 +0100
@@ -1792,15 +1792,21 @@
# Get the perf value if -f (performance) option defined or -k (check bandwidth)
if (defined($o_perf) || defined($o_checkperf) || $expected_speed!=0) {
if (!defined($o_minsnmp)) {
- verb("Retrieving OIDs: ".join(' ',@oid_perf));
- $resultf = $session->get_request(
- Varbindlist => \@oid_perf
- );
- if (!defined($resultf)) {
- printf("ERROR: Statistics table : %s.\n", $session->error);
- $session->close;
- exit $ERRORS{"UNKNOWN"};
- }
+ while (@oid_perf) {
+ my @sublist = splice @oid_perf, 0, 10;
+ verb("Retrieving OIDs: ".join(' ',@sublist));
+ my $oid_resultf = $session->get_request(
+ Varbindlist => \@sublist
+ );
+ if (!defined($oid_resultf)) {
+ printf("ERROR: Statistics table : %s.\n", $session->error);
+ $session->close;
+ exit $ERRORS{"UNKNOWN"};
+ }
+ while (my ($key,$value) = each %{$oid_resultf}) {
+ $resultf->{$key}=$value;
+ }
+ }
}
else {
$resultf = $result;
also, in a number of cases the snmp call get_table failed on me, so I needed to add
-maxrepetitions => 1,
to every get_table call.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels