-
-
Notifications
You must be signed in to change notification settings - Fork 103
condition "... or not delayed" not working in combined conditions #1207
Description
When using "critical=not delayed", critical status is returned as expected (crit when service is not set to Delayed startup, ok when it is). Accordingly, using "critical=delayed" also works as expected. However, trying to combine "or not delayed" with other conditons seems to have no effect whatsoever
check command:
/usr/lib/nagios/plugins/check_nrpe -H '10.56.64.56' -c check_service -t 30 -a 'service=mssql$nospamproxydb' debug "warning=start_type ne 'auto' or not delayed" ; echo $?
result on non-delayed service
match mssql$nospamproxydb (SQL Server (NOSPAMPROXYDB)) - running (auto) - pid: 4752 - type: service-own-process, service - path: "D:\SQLDB\Instanz\MSSQL17.NOSPAMPROXYDB\MSSQL\Binn\sqlservr.exe" -sNOSPAMPROXYDB
|'mssql$nospamproxydb_start_type'=2;2;0 'mssql$nospamproxydb'=4;0;0
0
result on delayed service
match mssql$nospamproxydb (SQL Server (NOSPAMPROXYDB)) - running (delayed) - pid: 4752 - type: service-own-process, service - path: "D:\SQLDB\Instanz\MSSQL17.NOSPAMPROXYDB\MSSQL\Binn\sqlservr.exe" -sNOSPAMPROXYDB
|'mssql$nospamproxydb_start_type'=2;2;0 'mssql$nospamproxydb'=4;0;0
0
Return code is 0 (state OK) in both cases
Debug from client:
D w32system Parsing: ${status}: ${crit_list}, delayed (${warn_list})
D w32system Parsing: ${name}=${state} (${start_type})
D w32system Parsing: ${name}
D w32system Parsing: %(status): All %(count) service(s) are ok.
D w32system Parsing: %(status): No services found
D w32system Parsing: start_type ne 'auto' or not delayed
D w32system Parsing succeeded: (tbd){(tbd){(int)var:start_type ? (s){auto}} or ? ( (int)var:delayed ) }
D w32system Type resolution succeeded: (bool){(bool){(int)var:start_type ? {ui:2}convert((s){auto})} or ? ( (int)var:delayed ) }
D w32system Binding succeeded: (bool){(bool){(int)var:start_type ? {ui:2}convert((s){auto})} or ? ( (int)var:delayed ) }
D w32system Static evaluation succeeded: (bool){(bool){(int)var:start_type ? {ui:2}convert((s){auto})} or ? ( (int)var:delayed ) }
D w32system Parsing: not state_is_ok()
D w32system Parsing succeeded: ? ( (string)fun:state_is_ok )
D w32system Type resolution succeeded: ? ( (string)fun:state_is_ok )
D w32system Binding succeeded: ? ( (string)fun:state_is_ok )
D w32system Static evaluation succeeded: ? ( (string)fun:state_is_ok )
D w32system Invalid types in binary operator: 2 ? convert(2) or ? ( 0 )
Edit: using latest 0.11.26 client