(plugin) os::aix::local - mode lvsync fix --filter-mount option (#3950)
This commit is contained in:
parent
f3d22e60fb
commit
6efd1f30ab
|
@ -24,7 +24,7 @@ use base qw(centreon::plugins::templates::counter);
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
use centreon::plugins::templates::catalog_functions qw(catalog_status_threshold);
|
use centreon::plugins::templates::catalog_functions qw(catalog_status_threshold_ng);
|
||||||
|
|
||||||
sub custom_status_output {
|
sub custom_status_output {
|
||||||
my ($self, %options) = @_;
|
my ($self, %options) = @_;
|
||||||
|
@ -56,7 +56,7 @@ sub set_counters {
|
||||||
];
|
];
|
||||||
|
|
||||||
$self->{maps_counters}->{lvs} = [
|
$self->{maps_counters}->{lvs} = [
|
||||||
{ label => 'status', threshold => 0, set => {
|
{ label => 'status', type => 2, critical_default => '%{state} =~ /stale/i', set => {
|
||||||
key_values => [
|
key_values => [
|
||||||
{ name => 'state' }, { name => 'mount' },
|
{ name => 'state' }, { name => 'mount' },
|
||||||
{ name => 'lv' }, { name => 'pp' },
|
{ name => 'lv' }, { name => 'pp' },
|
||||||
|
@ -65,7 +65,7 @@ sub set_counters {
|
||||||
],
|
],
|
||||||
closure_custom_output => $self->can('custom_status_output'),
|
closure_custom_output => $self->can('custom_status_output'),
|
||||||
closure_custom_perfdata => sub { return 0; },
|
closure_custom_perfdata => sub { return 0; },
|
||||||
closure_custom_threshold_check => \&catalog_status_threshold
|
closure_custom_threshold_check => \&catalog_status_threshold_ng
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
@ -78,22 +78,12 @@ sub new {
|
||||||
|
|
||||||
$options{options}->add_options(arguments => {
|
$options{options}->add_options(arguments => {
|
||||||
'filter-type:s' => { name => 'filter_type' },
|
'filter-type:s' => { name => 'filter_type' },
|
||||||
'unknown-status:s' => { name => 'unknown_status', default => '' },
|
'filter-mount:s' => { name => 'filter_mount' }
|
||||||
'warning-status:s' => { name => 'warning_status', default => '' },
|
|
||||||
'critical-status:s' => { name => 'critical_status', default => '%{state} =~ /stale/i' },
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$self->{result} = {};
|
|
||||||
return $self;
|
return $self;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub check_options {
|
|
||||||
my ($self, %options) = @_;
|
|
||||||
$self->SUPER::check_options(%options);
|
|
||||||
|
|
||||||
$self->change_macros(macros => ['warning_status', 'critical_status', 'unknown_status']);
|
|
||||||
}
|
|
||||||
|
|
||||||
sub manage_selection {
|
sub manage_selection {
|
||||||
my ($self, %options) = @_;
|
my ($self, %options) = @_;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue