From ea2b1b88535563dfd985229dca7d1db8482b2363 Mon Sep 17 00:00:00 2001 From: garnier-quentin Date: Thu, 18 Apr 2019 14:13:05 +0200 Subject: [PATCH] fix new perfdata naming --- network/aerohive/snmp/mode/connectedusers.pm | 2 +- network/alcatel/isam/snmp/mode/hubsapusage.pm | 6 +++--- network/alcatel/isam/snmp/mode/memory.pm | 4 ++-- .../breezeaccess/snmp/mode/radiostatus.pm | 4 ++-- storage/hp/lefthand/snmp/mode/volumeusage.pm | 17 ++++++++--------- 5 files changed, 16 insertions(+), 17 deletions(-) diff --git a/network/aerohive/snmp/mode/connectedusers.pm b/network/aerohive/snmp/mode/connectedusers.pm index 72b1914d2..527b7001e 100644 --- a/network/aerohive/snmp/mode/connectedusers.pm +++ b/network/aerohive/snmp/mode/connectedusers.pm @@ -44,7 +44,7 @@ sub set_counters { }, ]; $self->{maps_counters}->{ssid} = [ - { label => 'ssid', nlabel => 'ssid.users.cuurent.count', set => { + { label => 'ssid', nlabel => 'ssid.users.current.count', set => { key_values => [ { name => 'total' }, { name => 'display' } ], output_template => 'users : %s', perfdatas => [ diff --git a/network/alcatel/isam/snmp/mode/hubsapusage.pm b/network/alcatel/isam/snmp/mode/hubsapusage.pm index 7352152c8..8df79a4c1 100644 --- a/network/alcatel/isam/snmp/mode/hubsapusage.pm +++ b/network/alcatel/isam/snmp/mode/hubsapusage.pm @@ -45,7 +45,7 @@ sub set_counters { closure_custom_threshold_check => $self->can('custom_status_threshold'), } }, - { label => 'in-traffic', nlabel => 'sap.traffic.in.bitsperseconds', set => { + { label => 'in-traffic', nlabel => 'sap.traffic.in.bitspersecond', set => { key_values => [ { name => 'in', diff => 1 }, { name => 'display' } ], per_second => 1, closure_custom_calc => $self->can('custom_sap_calc'), closure_custom_calc_extra_options => { label_ref => 'in' }, @@ -66,7 +66,7 @@ sub set_counters { ]; $self->{maps_counters}->{global} = [ - { label => 'total-in-traffic', nlabel => 'traffic.in.bitsperseconds', set => { + { label => 'total-in-traffic', nlabel => 'sap.traffic.in.bitspersecond', set => { key_values => [], manual_keys => 1, per_second => 1, output_change_bytes => 2, closure_custom_calc => $self->can('custom_total_traffic_calc'), closure_custom_calc_extra_options => { label_ref => 'in' }, @@ -75,7 +75,7 @@ sub set_counters { closure_custom_threshold_check => $self->can('custom_total_traffic_threshold'), } }, - { label => 'total-out-traffic', nlabel => 'traffic.out.bitsperseconds', set => { + { label => 'total-out-traffic', nlabel => 'sap.traffic.out.bitspersecond', set => { key_values => [], manual_keys => 1, per_second => 1, output_change_bytes => 2, closure_custom_calc => $self->can('custom_total_traffic_calc'), closure_custom_calc_extra_options => { label_ref => 'out' }, diff --git a/network/alcatel/isam/snmp/mode/memory.pm b/network/alcatel/isam/snmp/mode/memory.pm index 9b686ea2d..d4aaf37da 100644 --- a/network/alcatel/isam/snmp/mode/memory.pm +++ b/network/alcatel/isam/snmp/mode/memory.pm @@ -31,7 +31,7 @@ sub custom_usage_perfdata { my ($label, $nlabel) = ('used', $self->{nlabel}); my $value_perf = $self->{result_values}->{used}; if (defined($self->{instance_mode}->{option_results}->{free})) { - ($label, $nlabel) = ('free', 'memory.usage.bytes'); + ($label, $nlabel) = ('free', 'memory.free.bytes'); $value_perf = $self->{result_values}->{free}; } @@ -43,7 +43,7 @@ sub custom_usage_perfdata { $self->{output}->perfdata_add( label => $label, unit => 'B', - nlabel => $self->{nlabel}, + nlabel => $nlabel, instances => $self->use_instances(extra_instance => $options{extra_instance}) ? $self->{result_values}->{display} : undef, value => $value_perf, warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning-' . $self->{thlabel}, %total_options), diff --git a/network/alvarion/breezeaccess/snmp/mode/radiostatus.pm b/network/alvarion/breezeaccess/snmp/mode/radiostatus.pm index 65ad11b66..4e0dfe5f6 100644 --- a/network/alvarion/breezeaccess/snmp/mode/radiostatus.pm +++ b/network/alvarion/breezeaccess/snmp/mode/radiostatus.pm @@ -46,7 +46,7 @@ sub set_counters { { name => 'global', type => 0, skipped_code => { -10 => 1 } }, ]; $self->{maps_counters}->{global} = [ - { label => 'rx-snr', nlabel => 'rx.snr.ratio', set => { + { label => 'rx-snr', nlabel => 'rx.signal.noise.ratio.dbm', set => { key_values => [ { name => 'rx_snr' } ], output_template => 'Average signal to noise ratio: %s Dbm', perfdatas => [ @@ -54,7 +54,7 @@ sub set_counters { ], } }, - { label => 'rx-power', nlabel => 'rx.power.dbm', set => { + { label => 'rx-power', nlabel => 'rx.signal.strength.dbm', set => { key_values => [ { name => 'rx_power' } ], output_template => 'Received signal strength: %s Dbm', perfdatas => [ diff --git a/storage/hp/lefthand/snmp/mode/volumeusage.pm b/storage/hp/lefthand/snmp/mode/volumeusage.pm index dc7456e78..4823b86ec 100644 --- a/storage/hp/lefthand/snmp/mode/volumeusage.pm +++ b/storage/hp/lefthand/snmp/mode/volumeusage.pm @@ -199,15 +199,14 @@ sub new { bless $self, $class; $self->{version} = '1.0'; - $options{options}->add_options(arguments => - { - "filter-name:s" => { name => 'filter_name' }, - "warning-replication-status:s" => { name => 'warning_replication_status', default => '' }, - "critical-replication-status:s" => { name => 'critical_replication_status', default => '%{status} !~ /normal/i' }, - "units:s" => { name => 'units', default => '%' }, - "free" => { name => 'free' }, - }); - + $options{options}->add_options(arguments => { + "filter-name:s" => { name => 'filter_name' }, + "warning-replication-status:s" => { name => 'warning_replication_status', default => '' }, + "critical-replication-status:s" => { name => 'critical_replication_status', default => '%{status} !~ /normal/i' }, + "units:s" => { name => 'units', default => '%' }, + "free" => { name => 'free' }, + }); + return $self; }