3CX, only set critical by default

This commit is contained in:
CPbN 2019-05-28 15:21:26 +02:00
parent c9158f6744
commit 1356672af2
1 changed files with 6 additions and 8 deletions

View File

@ -96,8 +96,8 @@ sub new {
$self->{version} = '1.0'; $self->{version} = '1.0';
$options{options}->add_options(arguments => { $options{options}->add_options(arguments => {
"unknown-status:s" => { name => 'unknown_status', default => '' }, "unknown-status:s" => { name => 'unknown_status', default => '' },
"warning-status:s" => { name => 'warning_status', default => '%{display} =~ /HasUpdatesAvailable/ && %{health} =~ /true/' }, "warning-status:s" => { name => 'warning_status', default => '' },
"critical-status:s" => { name => 'critical_status', default => '%{display} !~ /HasUpdatesAvailable/ && %{health} =~ /false/' }, "critical-status:s" => { name => 'critical_status', default => '%{health} =~ /false/' },
}); });
return $self; return $self;
@ -137,7 +137,7 @@ sub manage_selection {
}; };
$self->{service}->{HasUpdatesAvailable} = { $self->{service}->{HasUpdatesAvailable} = {
display => 'HasUpdatesAvailable', display => 'HasUpdatesAvailable',
health => scalar(@$update) ? 'true' : 'false', health => scalar(@$update) ? 'false' : 'true',
}; };
$self->{global} = { $self->{global} = {
@ -158,19 +158,17 @@ Check system health
=item B<--unknown-status> =item B<--unknown-status>
Set warning threshold for status. Set unknown threshold for status.
Can used special variables like: %{health}, %{display} Can used special variables like: %{health}, %{display}
=item B<--warning-status> =item B<--warning-status>
Set warning threshold for status Set warning threshold for status.
(Default: '%{display} =~ /HasUpdatesAvailable/ && %{health} =~ /true/').
Can used special variables like: %{health}, %{display} Can used special variables like: %{health}, %{display}
=item B<--critical-status> =item B<--critical-status>
Set critical threshold for status Set critical threshold for status (Default: '%{health} =~ /false/').
(Default: '%{display} !~ /HasUpdatesAvailable/ && %{health} =~ /false/').
Can used special variables like: %{health}, %{display} Can used special variables like: %{health}, %{display}
=item B<--warning-*> B<--critical-*> =item B<--warning-*> B<--critical-*>