Page 2 of 2
Re: Website monitoring through nagios with specific requirem
Posted: Wed Jan 16, 2019 11:51 am
by mcapra
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.
Code: Select all
-v, --verbose
Show details for command-line debugging (Nagios may truncate output)
Re: Website monitoring through nagios with specific requirem
Posted: Wed Jan 16, 2019 12:11 pm
by scottwilkerson
Also a good idea, thanks
@mcapra
Re: Website monitoring through nagios with specific requirem
Posted: Wed Jan 16, 2019 12:49 pm
by naranant
Please find the error screenshot..
If i am using the curl command wrongly do let me know the right syntax
Re: Website monitoring through nagios with specific requirem
Posted: Wed Jan 16, 2019 12:57 pm
by mcapra
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?
Re: Website monitoring through nagios with specific requirem
Posted: Wed Jan 16, 2019 3:11 pm
by scottwilkerson
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