Website monitoring through nagios with specific requirement

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Website monitoring through nagios with specific requirem

Post 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)
Former Nagios employee
https://www.mcapra.com/
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Website monitoring through nagios with specific requirem

Post by scottwilkerson »

Also a good idea, thanks @mcapra
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
naranant
Posts: 90
Joined: Tue Oct 24, 2017 10:50 am

Re: Website monitoring through nagios with specific requirem

Post by naranant »

Please find the error screenshot..

If i am using the curl command wrongly do let me know the right syntax
You do not have the required permissions to view the files attached to this post.
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Website monitoring through nagios with specific requirem

Post 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?
Former Nagios employee
https://www.mcapra.com/
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Website monitoring through nagios with specific requirem

Post 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
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked