fix new perfdata naming
This commit is contained in:
parent
336b28591b
commit
ea2b1b8853
|
@ -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 => [
|
||||
|
|
|
@ -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' },
|
||||
|
|
|
@ -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),
|
||||
|
|
|
@ -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 => [
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue