+ Fix ggsn juniper: right unit for traffic
This commit is contained in:
parent
ef40bca891
commit
43ee7f1582
|
@ -53,7 +53,7 @@ my $maps_counters = {
|
|||
output_template => 'Traffic In : %s %s/s',
|
||||
perfdatas => [
|
||||
{ label => 'traffic_in', value => 'ggsnApnUplinkBytes_per_second', template => '%s',
|
||||
unit => 'b', min => 0, label_extra_instance => 1, cast_int => 1, instance_use => 'ggsnApnName_absolute' },
|
||||
unit => 'b/s', min => 0, label_extra_instance => 1, cast_int => 1, instance_use => 'ggsnApnName_absolute' },
|
||||
],
|
||||
}
|
||||
},
|
||||
|
@ -66,7 +66,7 @@ my $maps_counters = {
|
|||
output_template => 'Traffic Out : %s %s/s',
|
||||
perfdatas => [
|
||||
{ label => 'traffic_out', value => 'ggsnApnDownlinkBytes_per_second', template => '%s',
|
||||
unit => 'b', min => 0, label_extra_instance => 1, cast_int => 1, instance_use => 'ggsnApnName_absolute' },
|
||||
unit => 'b/s', min => 0, label_extra_instance => 1, cast_int => 1, instance_use => 'ggsnApnName_absolute' },
|
||||
],
|
||||
}
|
||||
},
|
||||
|
@ -378,6 +378,8 @@ sub manage_selection {
|
|||
next;
|
||||
}
|
||||
|
||||
$result->{ggsnApnDownlinkBytes} *= 8 if (defined($result->{ggsnApnDownlinkBytes}));
|
||||
$result->{ggsnApnUplinkBytes} *= 8 if (defined($result->{ggsnApnUplinkBytes}));
|
||||
$self->{apn_selected}->{$instance} = $result;
|
||||
}
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ my $maps_counters = {
|
|||
output_template => 'Traffic In : %s %s/s',
|
||||
perfdatas => [
|
||||
{ label => 'traffic_in', value => 'ggsnUplinkBytes_per_second', template => '%s',
|
||||
unit => 'b', min => 0, cast_int => 1 },
|
||||
unit => 'b/s', min => 0, cast_int => 1 },
|
||||
],
|
||||
}
|
||||
},
|
||||
|
@ -65,7 +65,7 @@ my $maps_counters = {
|
|||
output_template => 'Traffic Out : %s %s/s',
|
||||
perfdatas => [
|
||||
{ label => 'traffic_out', value => 'ggsnDownlinkBytes_per_second', template => '%s',
|
||||
unit => 'b', min => 0, cast_int => 1 },
|
||||
unit => 'b/s', min => 0, cast_int => 1 },
|
||||
],
|
||||
}
|
||||
},
|
||||
|
@ -348,6 +348,8 @@ sub manage_selection {
|
|||
$self->{results} = $self->{snmp}->get_table(oid => $oid_ggsnGlobalStats,
|
||||
nothing_quit => 1);
|
||||
$self->{global} = $self->{snmp}->map_instance(mapping => $mapping, results => $self->{results}, instance => '0');
|
||||
$self->{global}->{ggsnDownlinkBytes} *= 8 if (defined($self->{global}->{ggsnDownlinkBytes}));
|
||||
$self->{global}->{ggsnUplinkBytes} *= 8 if (defined($self->{global}->{ggsnUplinkBytes}));
|
||||
}
|
||||
|
||||
1;
|
||||
|
|
Loading…
Reference in New Issue