mirror of
https://github.com/centreon/centreon-plugins.git
synced 2025-07-27 07:34:35 +02:00
(plugin) storage::ibm::storwize::ssh - metric v2 (#4649)
This commit is contained in:
parent
a33b359a40
commit
1f85378b5c
@ -66,7 +66,6 @@ sub check {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
$self->{output}->perfdata_add(
|
$self->{output}->perfdata_add(
|
||||||
label => "sstat",
|
|
||||||
nlabel => 'hardware.systemstats.current.count',
|
nlabel => 'hardware.systemstats.current.count',
|
||||||
instances => $_->{stat_name},
|
instances => $_->{stat_name},
|
||||||
value => $_->{stat_current},
|
value => $_->{stat_current},
|
||||||
|
@ -28,7 +28,7 @@ use DateTime;
|
|||||||
|
|
||||||
sub new {
|
sub new {
|
||||||
my ($class, %options) = @_;
|
my ($class, %options) = @_;
|
||||||
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
|
my $self = $class->SUPER::new(package => __PACKAGE__, %options, force_new_perfdata => 1);
|
||||||
bless $self, $class;
|
bless $self, $class;
|
||||||
|
|
||||||
$options{options}->add_options(arguments => {
|
$options{options}->add_options(arguments => {
|
||||||
@ -101,8 +101,9 @@ sub run {
|
|||||||
severity => $exit,
|
severity => $exit,
|
||||||
short_msg => sprintf("%d problem detected (use verbose for more details)", $num_errors)
|
short_msg => sprintf("%d problem detected (use verbose for more details)", $num_errors)
|
||||||
);
|
);
|
||||||
|
|
||||||
$self->{output}->perfdata_add(
|
$self->{output}->perfdata_add(
|
||||||
label => 'problems',
|
nlabel => 'eventlogs.problems.count',
|
||||||
value => $num_errors,
|
value => $num_errors,
|
||||||
warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning'),
|
warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning'),
|
||||||
critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical'),
|
critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical'),
|
||||||
|
@ -78,7 +78,7 @@ sub ssh_execute {
|
|||||||
|
|
||||||
sub new {
|
sub new {
|
||||||
my ($class, %options) = @_;
|
my ($class, %options) = @_;
|
||||||
my $self = $class->SUPER::new(package => __PACKAGE__, %options, no_absent => 1);
|
my $self = $class->SUPER::new(package => __PACKAGE__, %options, no_absent => 1, force_new_perfdata => 1);
|
||||||
bless $self, $class;
|
bless $self, $class;
|
||||||
|
|
||||||
$options{options}->add_options(arguments => {});
|
$options{options}->add_options(arguments => {});
|
||||||
|
@ -35,10 +35,10 @@ sub custom_status_output {
|
|||||||
sub custom_usage_perfdata {
|
sub custom_usage_perfdata {
|
||||||
my ($self, %options) = @_;
|
my ($self, %options) = @_;
|
||||||
|
|
||||||
my $label = 'used';
|
my $label = 'pool.space.usage.bytes';
|
||||||
my $value_perf = $self->{result_values}->{used};
|
my $value_perf = $self->{result_values}->{used};
|
||||||
if (defined($self->{instance_mode}->{option_results}->{free})) {
|
if (defined($self->{instance_mode}->{option_results}->{free})) {
|
||||||
$label = 'free';
|
$label = 'pool.space.free.bytes';
|
||||||
$value_perf = $self->{result_values}->{free};
|
$value_perf = $self->{result_values}->{free};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -49,12 +49,14 @@ sub custom_usage_perfdata {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$self->{output}->perfdata_add(
|
$self->{output}->perfdata_add(
|
||||||
label => $label, unit => 'B',
|
nlabel => $label,
|
||||||
instances => $self->use_instances(extra_instance => $options{extra_instance}) ? $self->{result_values}->{display} : undef,
|
unit => 'B',
|
||||||
|
instances => $self->{result_values}->{display},
|
||||||
value => $value_perf,
|
value => $value_perf,
|
||||||
warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning-' . $self->{thlabel}, %total_options),
|
warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning-' . $self->{thlabel}, %total_options),
|
||||||
critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical-' . $self->{thlabel}, %total_options),
|
critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical-' . $self->{thlabel}, %total_options),
|
||||||
min => 0, max => $self->{result_values}->{total}
|
min => 0,
|
||||||
|
max => $self->{result_values}->{total}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -141,7 +143,7 @@ sub set_counters {
|
|||||||
|
|
||||||
sub new {
|
sub new {
|
||||||
my ($class, %options) = @_;
|
my ($class, %options) = @_;
|
||||||
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
|
my $self = $class->SUPER::new(package => __PACKAGE__, %options, force_new_perfdata => 1);
|
||||||
bless $self, $class;
|
bless $self, $class;
|
||||||
|
|
||||||
$options{options}->add_options(arguments => {
|
$options{options}->add_options(arguments => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user