Closed joschi99 closed 1 year ago
You have the option --warning-total and --critical-total with that PR: https://github.com/centreon/centreon-plugins/pull/4606
For the issue 2, it's a syntax issue. It's a regexp so you need to use the operator !~
Actually it was broken with https://github.com/centreon/centreon-plugins/pull/4573/commits/cb55715b53837159c6d0c87972a848f4726ba762 and the change in counter's label name. The addition of a "s" to "service" broked the mapping with old options:
if (defined($options{option_results}->{critical}) && $options{option_results}->{critical} ne '') {
$options{option_results}->{'critical-service-active-count'} = $options{option_results}->{critical};
}
With default configuration that makes sure at least 1 service is expected (--critical=1:) you should have:
CRITICAL: Number of services active: 0 | 'services.active.count'=0;;1:;0; 'services.continue.pending.count'=0;;;0; 'services.pause.pending.count'=0;;;0; 'services.paused.count'=0;;;0;
Eventhough the total metric is useful, you don't really need it.
I making the PR for the missing "s".
Or can you add it in the https://github.com/centreon/centreon-plugins/pull/4606 @garnier-quentin ?
@cgagnaire i have add it
Hello ! we are facing the same 1. issue !
When do you plane to merge the MR https://github.com/centreon/centreon-plugins/pull/4606 ?
Thanks a lot for your work !
Using latest version 20230810 there are some problems with refactored version:
--critical-status='%{operating_state} != /active/'
or--critical-status='%{operating_state} != /test/'
output status will not change