monitoringubuntu-8.04

monit and apache site behind http-basic-auth


I have a web server which is protected behind http-basic-auth. I've read through the monit docs and it doesn't seem like there's a clear way to pass credentials in order to test that the test page on the server is being returned correctly.

Any thoughts?

Thanks!

(Please don't confuse this with monit's own httpd for showing monit status in a web page)

PS this is monit 4.8.1 -- that which comes with Ubuntu Hardy 8.04


Solution

  • It seems to be possible to include the credentials in the URL, have you tried this?:

    (from http://mmonit.com/monit/documentation/monit.html#connection_testing )

    [...] Where URL-spec is an URL on the standard form as specified in RFC 2396:

    <protocol>://<authority><path>?<query>

    Here is an example of an URL where all components are used:

    http://user:password@www.foo.bar:8080/document/?querystring#ref

    If a username and password is included in the URL Monit will attempt to login at the server using Basic Authentication.