fix efs path

This commit is contained in:
garnier-quentin 2020-03-31 18:36:35 +02:00 committed by Lotfi zaouche
parent 076c320652
commit 4d16c55602
5 changed files with 26 additions and 24 deletions

View File

@ -130,8 +130,9 @@ sub new {
bless $self, $class; bless $self, $class;
$options{options}->add_options(arguments => { $options{options}->add_options(arguments => {
"name:s@" => { name => 'name' }, 'name:s@' => { name => 'name' },
}); });
return $self; return $self;
} }

View File

@ -90,7 +90,8 @@ sub custom_metric_threshold {
my $exit = $self->{perfdata}->threshold_check( my $exit = $self->{perfdata}->threshold_check(
value => defined($self->{instance_mode}->{option_results}->{per_sec}) ? $self->{result_values}->{value_per_sec} : $self->{result_values}->{value}, value => defined($self->{instance_mode}->{option_results}->{per_sec}) ? $self->{result_values}->{value_per_sec} : $self->{result_values}->{value},
threshold => [ { label => 'critical-' . $metrics_mapping{$self->{result_values}->{metric}}->{label}, exit_litteral => 'critical' }, threshold => [ { label => 'critical-' . $metrics_mapping{$self->{result_values}->{metric}}->{label}, exit_litteral => 'critical' },
{ label => 'warning-' . $metrics_mapping{$self->{result_values}->{metric}}->{label}, exit_litteral => 'warning' } ]); { label => 'warning-' . $metrics_mapping{$self->{result_values}->{metric}}->{label}, exit_litteral => 'warning' } ]
);
return $exit; return $exit;
} }
@ -185,10 +186,10 @@ sub new {
bless $self, $class; bless $self, $class;
$options{options}->add_options(arguments => { $options{options}->add_options(arguments => {
"type:s" => { name => 'type' }, 'type:s' => { name => 'type' },
"name:s@" => { name => 'name' }, 'name:s@' => { name => 'name' },
"per-sec" => { name => 'per_sec' }, 'per-sec' => { name => 'per_sec' },
"filter-metric:s" => { name => 'filter_metric' }, 'filter-metric:s' => { name => 'filter_metric' },
}); });
return $self; return $self;

View File

@ -32,7 +32,7 @@ sub new {
bless $self, $class; bless $self, $class;
$options{options}->add_options(arguments => { $options{options}->add_options(arguments => {
"prettify" => { name => 'prettify' }, 'prettify' => { name => 'prettify' }
}); });
return $self; return $self;

View File

@ -31,9 +31,9 @@ sub new {
$self->{version} = '1.0'; $self->{version} = '1.0';
%{ $self->{modes} } = ( %{ $self->{modes} } = (
'connections' => 'cloud::aws::efs::mode::connections', 'connections' => 'cloud::aws::efs::mode::connections',
'datausage' => 'cloud::aws::efs::mode::datausage', 'datausage' => 'cloud::aws::efs::mode::datausage',
'discovery' => 'cloud::aws::efs::mode::discovery' 'discovery' => 'cloud::aws::efs::mode::discovery'
); );
$self->{custom_modes}{paws} = 'cloud::aws::custom::paws'; $self->{custom_modes}{paws} = 'cloud::aws::custom::paws';

View File

@ -235,7 +235,7 @@ sub filter_networks {
} }
if (scalar(@$network_ids) > 5) { if (scalar(@$network_ids) > 5) {
$self->{output}->add_option_msg(short_msg => 'cannot check than 5 networks at once'); $self->{output}->add_option_msg(short_msg => 'cannot check than 5 networks at once (api rate limit)');
$self->{output}->option_exit(); $self->{output}->option_exit();
} }