From 24a0ab36430a9119731ce27727d80c3d96bfc694 Mon Sep 17 00:00:00 2001 From: Colin Gagnaire Date: Wed, 31 Jul 2019 15:56:02 +0200 Subject: [PATCH] enh aruba standard --- .../common/aruba/snmp/mode/apssidstatistics.pm | 14 +++++++++++++- centreon/common/aruba/snmp/mode/cpu.pm | 2 +- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/centreon/common/aruba/snmp/mode/apssidstatistics.pm b/centreon/common/aruba/snmp/mode/apssidstatistics.pm index 3e9f8db57..87a738ad5 100644 --- a/centreon/common/aruba/snmp/mode/apssidstatistics.pm +++ b/centreon/common/aruba/snmp/mode/apssidstatistics.pm @@ -32,6 +32,7 @@ sub set_counters { { name => 'ap', type => 3, cb_prefix_output => 'prefix_output_ap', cb_long_output => 'long_output', message_multiple => 'All AP BSSID are ok', indent_long_output => ' ', group => [ + { name => 'global', type => 0 }, { name => 'essid', display_long => 1, cb_prefix_output => 'prefix_output_essid', message_multiple => 'All ESSID are ok', type => 1 }, { name => 'bssid', display_long => 1, cb_prefix_output => 'prefix_output_bssid', @@ -39,6 +40,17 @@ sub set_counters { ] } ]; + + $self->{maps_counters}->{global} = [ + { label => 'stations-associated', nlabel => 'stations.associated.count', set => { + key_values => [ { name => 'total' } ], + output_template => 'Stations Associated: %d', + perfdatas => [ + { value => 'total_absolute', template => '%d', min => 0 }, + ], + } + }, + ]; $self->{maps_counters}->{essid} = [ { label => 'essid-stations-associated', nlabel => 'essid.stations.associated.count', set => { @@ -166,7 +178,6 @@ sub manage_selection { nothing_quit => 1 ); - $self->{global}->{connected} = 0; $self->{ap} = {}; foreach my $oid (keys %{$snmp_result->{$oid_wlsxWlanAPBssidTable}}) { @@ -207,6 +218,7 @@ sub manage_selection { next; } + $self->{ap}->{$result->{wlanAPName}}->{global}->{total} += $result->{wlanAPBssidNumAssociatedStations}; $self->{ap}->{$result->{wlanAPName}}->{wlanAPName} = $result->{wlanAPName}; $self->{ap}->{$result->{wlanAPName}}->{wlanAPMacAddress} = $result->{wlanAPMacAddress}; $self->{ap}->{$result->{wlanAPName}}->{essid}->{$result->{wlanAPESSID}}->{wlanAPEssidNumAssociatedStations} += $result->{wlanAPBssidNumAssociatedStations}; diff --git a/centreon/common/aruba/snmp/mode/cpu.pm b/centreon/common/aruba/snmp/mode/cpu.pm index 287c2ceda..c6b25d2e2 100644 --- a/centreon/common/aruba/snmp/mode/cpu.pm +++ b/centreon/common/aruba/snmp/mode/cpu.pm @@ -39,7 +39,7 @@ sub set_counters { output_template => 'Utilization %.2f%%', perfdatas => [ { label => 'utilization', value => 'sysExtProcessorLoad_absolute', template => '%.2f', min => 0, max => 100, - unit => '%', label_extra_instance => 1, instance_use => 'display_absolute' }, + unit => '%', label_extra_instance => 1, instance_use => 'sysExtProcessorDescr_absolute' }, ], } },