drewkerrigan/nagios-http-json

Problem with boolean value

cradix opened this issue · 2 comments

Hello,

I have a health check request that returns the following json :
{ "deadlocks": {"healthy": true}, "hibernate": {"healthy": true} }

I tried to use the nagios http json plugin with the following configuration :
-q deadlocks.healthy,true
But it always return the same message:
WARNING: Status WARNING. Value for key deadlocks.healthy did not match true.

I don't understand why, what is the right configuration so that it consider "true" as matching ?

I had the same problem but with debugging enabled (-d) I saw the following output:

{u'healthy': True, u'message': u'success'}

The problem was the uppercase "T" for the "healthy" values. Firefox showed it lowercase but the HTTP request was uppercase.

Thanks, it works !