Hi,
I'm facing an issue since the last update of this plugin. The service is considered unknown when it's in a stopped state (crash) and correctly running before the crash.
OS: Alma 8
Plugin version : 20230706-100638.el8
/usr/lib/centreon/plugins//centreon_windows_snmp.pl --plugin=os::windows::snmp::plugin --mode=service --hostname=192.168.7.16 --snmp-version='2c' --snmp-community='cloudmon' --snmp-autoreduce --snmp-timeout=30 --service='ControlUp Agent' --warning= --critical=1: --state='' --regexp --verbose
CRITICAL: Service problem 'ControlUp Agent'
Plugin version : 20230810-100132.el8
/usr/lib/centreon/plugins//centreon_windows_snmp.pl --plugin=os::windows::snmp::plugin --mode=service --hostname=192.168.7.16 --snmp-version='2c' --snmp-community='cloudmon' --snmp-autoreduce --snmp-timeout=30 --filter-name='ControlUp Agent' --warning-active= --critical-active=1:
UNKNOWN: No service found.
This service exists. I've tried with a generic service as Themes and many versions of Windows (srv 2008, 2013, 2016, 2019).
I've tried with different option like --critical-status='%{installed_state} !~ /installed/i' or --warning-status= --critical-status='%{operating_state} !~ /active/' --warning-active= --warning-continue-pending= --warning-pause-pending= --warning-paused= --critical-active= --critical-continue-pending= --critical-pause-pending= --critical-paused=
The result is still the same, it's failed due to this part i think:
if (scalar(keys %{$self->{services}}) <= 0) {
$self->{output}->add_option_msg(short_msg => "No service found.");
$self->{output}->option_exit();
}
Could you please give me a hint or a way to adapt if the service exists, crashes and needs to show in a Critical state instead of Unknown?
Sébastien
Best answer by omercier
View original