From cd833e6948cea4f59438da6a2dcf0e3054428872 Mon Sep 17 00:00:00 2001 From: UrBnW <40244829+UrBnW@users.noreply.github.com> Date: Thu, 14 May 2020 21:57:08 +0200 Subject: [PATCH 1/2] fix(checkpoint) unknown if can't compute thresholds --- network/checkpoint/snmp/mode/connections.pm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/network/checkpoint/snmp/mode/connections.pm b/network/checkpoint/snmp/mode/connections.pm index 90adbcc9c..46bc69dba 100644 --- a/network/checkpoint/snmp/mode/connections.pm +++ b/network/checkpoint/snmp/mode/connections.pm @@ -76,6 +76,13 @@ sub run { $value = $prct_used; %total_options = ( total => $result->{$oid_fwConnTableLimit}, cast_int => 1); } + } elsif ($self->{option_results}->{units} eq '%') { + $self->{output}->output_add( + severity => 'UNKNOWN', + short_msg => "Couldn't get fwConnTableLimit OID ($oid_fwConnTableLimit) to compute thresholds" + ); + $self->{output}->display(); + $self->{output}->exit(); } my $exit = $self->{perfdata}->threshold_check(value => $value, From 1b2d6d6ca5c95174d017a8249f0d7ffd1cf4138c Mon Sep 17 00:00:00 2001 From: Sims24 Date: Thu, 14 May 2020 22:22:33 +0200 Subject: [PATCH 2/2] enh(plugin)review-option-name --- cloud/aws/ebs/mode/volumeio.pm | 2 +- cloud/aws/ebs/mode/volumeiops.pm | 2 +- cloud/aws/ebs/mode/volumetime.pm | 14 ++++++++++---- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/cloud/aws/ebs/mode/volumeio.pm b/cloud/aws/ebs/mode/volumeio.pm index d58c02afd..ed149b350 100644 --- a/cloud/aws/ebs/mode/volumeio.pm +++ b/cloud/aws/ebs/mode/volumeio.pm @@ -161,7 +161,7 @@ sub new { bless $self, $class; $options{options}->add_options(arguments => { - 'volumeid:s@' => { name => 'volume_id' }, + 'volume-id:s@' => { name => 'volume_id' }, 'per-sec' => { name => 'per_sec' }, 'filter-metric:s' => { name => 'filter_metric' } }); diff --git a/cloud/aws/ebs/mode/volumeiops.pm b/cloud/aws/ebs/mode/volumeiops.pm index 8207c81e0..f6ddb8fd1 100644 --- a/cloud/aws/ebs/mode/volumeiops.pm +++ b/cloud/aws/ebs/mode/volumeiops.pm @@ -189,7 +189,7 @@ sub new { bless $self, $class; $options{options}->add_options(arguments => { - 'volumeid:s@' => { name => 'volume_id' }, + 'volume-id:s@' => { name => 'volume_id' }, 'per-sec' => { name => 'per_sec' }, 'filter-metric:s' => { name => 'filter_metric' } }); diff --git a/cloud/aws/ebs/mode/volumetime.pm b/cloud/aws/ebs/mode/volumetime.pm index aea3122e9..4e3fbcff1 100644 --- a/cloud/aws/ebs/mode/volumetime.pm +++ b/cloud/aws/ebs/mode/volumetime.pm @@ -29,19 +29,25 @@ my %metrics_mapping = ( 'VolumeTotalReadTime' => { 'output' => 'Total Read Time', 'label' => 'total-read-time', - 'nlabel' => { 'absolute' => 'ebs.volume.totalread.time.second' }, + 'nlabel' => { + 'absolute' => 'ebs.volume.totalread.time.second' + }, 'unit' => 's' }, 'VolumeTotalWriteTime' => { 'output' => 'Total Write Time', 'label' => 'total-write-time', - 'nlabel' => { 'absolute' => 'ebs.volume.totalwrite.time.second' }, + 'nlabel' => { + 'absolute' => 'ebs.volume.totalwrite.time.second' + }, 'unit' => 's' }, 'VolumeIdleTime' => { 'output' => 'Idle Time', 'label' => 'idle-time', - 'nlabel' => { 'absolute' => 'ebs.volume.idle.time.second' }, + 'nlabel' => { + 'absolute' => 'ebs.volume.idle.time.second' + }, 'unit' => 's', 'display_percent' => 1 } @@ -154,7 +160,7 @@ sub new { bless $self, $class; $options{options}->add_options(arguments => { - 'volumeid:s@' => { name => 'volume_id' }, + 'volume-id:s@' => { name => 'volume_id' }, 'filter-metric:s' => { name => 'filter_metric' } });