[Nagiosplug-devel] Check_http and web-based checks
Ton Voon
ton.voon at altinity.com
Sun Mar 11 03:42:28 CET 2007
Hi Thomas,
On 8 Mar 2007, at 17:27, Thomas Guyot-Sionnest wrote:
> I just found out it could make my life much simpler if I could use web
> applications to do checks for me. I can with check_http (-s, -R),
> but I'd
> also like the ability to print what the script returned.
>
> I'd like to add two switches, -z (--print) -Z (--print-all). The
> former
> would replace check_http's result with the body of the page preserving
> check_http's performance data, while the latter would only print
> the page
> body. Used together with -s, -r or -R you can effectively write web
> plugins
> and use check_http to run them and gather the results.
>
> Additionally, if check_http already has code for handling this I
> could make
> a symlink (i.e. check_web) that would induce the -Z behavior, set -
> s to 'OK'
> and disable warn/crit thresholds (i.e. make them == to timeout).
>
> I could also add a warning switch (-W --warn-string ?) for warning,
> so that
> web-based checks would have full functionality.
>
> What do you think? Any objection? Comments? Better suggestions for
> switch
> names? Arguably this could be granted a new check plugin, but I'd
> like to
> use all check_http's features like SSL, authentication, regexps.
This sounds like a good idea. I guess it is effectively moving a lot
of the check logic from the plugin to the app server, which makes
sense in a lot of cases.
However, I'm tempted not to add this to check_http because the amount
of current options in this plugin is just too confusing. And the
thought of doing "hacks" to stop threshold alerts doesn't sound good.
Ideally, the "web connection stuff" should be moved "lower down", to
a lib/utils_http.c file, which is then available to other plugins,
like your check_web (check_webapp? check_webapp_text?
check_webapp_response?). There is a sslutils.c, done by Sean Finney,
which handles a lot of the SSL connection stuff. Regexps is already
provided from gnulib. I guess authentication is an option to "move
lower".
FYI, Karl was thinking about using libcurl's library for providing
the web connection, rather than our own home grown one, though this
is a long way off as no-one has expressed an interest in getting it
working.
Sorry, probably not the reply you wanted to hear :(
Ton
http://www.altinity.com
T: +44 (0)870 787 9243
F: +44 (0)845 280 1725
Skype: tonvoon
More information about the Devel
mailing list