Hello,
I have the requirement to monitor the URL with the authentication and need to ignore the alerts for the range from 2XX to 3XX. Need help in defining the same. Currently, i could define for only one range i.e. 200. Below is command line i have used.
Check_xi_service_http! -f ok -I xxx.xx.xxx.xxx -u '/' -S -p 443 -a 'xxxxxx:xxxxx' --expect=200!!!!!!!
Below is the output
HTTP CRITICAL - Invalid HTTP response received from host on port 443: HTTP/1.1 302 Found
URL monitoring with execultion for a range of value
Re: URL monitoring with execultion for a range of value
I'd imagine the list of valid response codes is short enough that one could hard-code them:
This would effectively return a CRITICAL for any 4xx/5xx codes unless the HTTP server is returning some crazy custom response codes. For a more elegant solution, I think check_http would need to be altered. Feel free to submit a GitHub issue to see that happen:
https://github.com/nagios-plugins/nagios-plugins
Code: Select all
/usr/local/nagios/libexec/check_http -H www.google.com -j HEAD --expect=200,201,202,203,204,205,206,207,208,226,300,301,302,303,304,305,306,307,308https://github.com/nagios-plugins/nagios-plugins
Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/
-
npolovenko
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: URL monitoring with execultion for a range of value
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: URL monitoring with execultion for a range of value
Thanks, @mcapra.
It worked...
It worked...
Re: URL monitoring with execultion for a range of value
Glad to hear it! I'll be closing this thread now, but feel free to open another if you need anything in the future.
Former Nagios employee