drewkerrigan/nagios-http-json

Critical on HealthCheck Endpoint

Pinpin31 opened this issue · 2 comments

Hi,
I have an healthchek endpoint in an application with boolean response, is there a way to have a critical status rather than warning if my healthcheck is false ?

/check_http_json.py  -H orion-ctrl-ofs-1.zsi.agri -P 8080 -p ofs/healthcheck -q "operationTime.healthy,False" "repository.healthy,False"
WARNING: Status check failed, reason: Value for key operationTime.healthy did not match False.

Thanks

Hi @Pinpin31, you highlighted a few issues I hadn't taken into account, and I've just committed a ton of changes. You should now see the following work:

... -Q "operationTime.healthy,True" "repository.healthy,True"
CRITICAL: Status CRITICAL. Value for key operationTime.healthy did not match True. Value for key repository.healthy did not match True.
... -q "operationTime.healthy,True" "repository.healthy,True"
WARNING: Status WARNING. Value for key operationTime.healthy did not match True. Value for key repository.healthy did not match True.

Great !
Thanks