diff --git a/network/juniper/ggsn/mode/apnstats.pm b/network/juniper/ggsn/mode/apnstats.pm index 30205b7e7..4a4c59100 100644 --- a/network/juniper/ggsn/mode/apnstats.pm +++ b/network/juniper/ggsn/mode/apnstats.pm @@ -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; } diff --git a/network/juniper/ggsn/mode/globalstats.pm b/network/juniper/ggsn/mode/globalstats.pm index 9534d2350..4b53ccff8 100644 --- a/network/juniper/ggsn/mode/globalstats.pm +++ b/network/juniper/ggsn/mode/globalstats.pm @@ -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;