naranant wrote:I tried with that but still getting the error.
[nagios@lx##.**.com ~]$ /usr/local/nagios/libexec/check_http -H lx*** -r "(firstName).*(lastName)" -f ok -I xx.x.x00.xx -u "/api/v1/user" -S -p 8085
HTTP CRITICAL: HTTP/1.1 400 - pattern not found - 138 bytes in 0.277 second response time |time=0.277116s;;;0.000000 size=138B;;;0
You might also try running check_http in verbose mode and sharing the output. Some sort of body is being returned, and might have a message indicating why the API returned a 400 status code.
Is there any documentation for this API? To return something 400/500 level and not provide any context feels kinda bad.
Without that documentation, all I can really do is speculate. Does this API need specific HTTP headers set in the request (Content-*, Access-Control-*, X-*, etc)? Is it expecting a particular request body/method? Is it outright rejecting certain HTTP agents, or only allowing specific agents?
mcapra wrote:Is there any documentation for this API? To return something 400/500 level and not provide any context feels kinda bad.
Without that documentation, all I can really do is speculate. Does this API need specific HTTP headers set in the request (Content-*, Access-Control-*, X-*, etc)? Is it expecting a particular request body/method? Is it outright rejecting certain HTTP agents, or only allowing specific agents?
I agree with mcapra, but lets also run the curn command again adding the --insecure flag because the error you are getting is because of the certificate not matching