Page 1 of 1

[Nagios-devel] --url option dumps core in check_http ; patch included

Posted: Sun Mar 21, 2004 8:58 pm
by Guest
Nasty little bug in the options checking -- the long form does not work.

anubis 10% /opt/nagios/libexec/check_http -H www.test.com --string=Test --url=/test.html
/opt/nagios/libexec/check_http: unrecognized option `--url=/test.html'
Segmentation fault (core dumped)

anubis 11% /opt/nagios/libexec/check_http -H www.test.com --string=Test -u /test.html
HTTP ok: HTTP/1.1 200 OK - 0.139 second response time |time= 0.139

The patch is simple -- the long form was never mapped to the short form.

*** plugins/check_http.c_orig Sun Mar 21 20:52:20 2004
--- plugins/check_http.c Sun Mar 21 20:55:17 2004
***************
*** 304,309 ****
--- 304,310 ----
{"verbose", no_argument, 0, 'v'},
{"post", required_argument, 0, 'P'},
{"IP-address", required_argument, 0, 'I'},
+ {"url", required_argument, 0, 'u'},
{"string", required_argument, 0, 's'},
{"regex", required_argument, 0, 'r'},
{"ereg", required_argument, 0, 'r'},

--
Joe Rhett Chief Geek
[email protected] Isite Services, Inc.





This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]