MMonit url monitoring with authentication

Issue #959 resolved
Kfeina feina created an issue


I would like to monitor the main mmonit page once authenticated with user/pass.

I tried the following:

check host url_mmonit with address
if failed port 8443 type tcp protocol https
username "monit" password "mmonit"
request "/index.csp"
content = "Latest status"
with ssl options {selfsigned: allow} then alert

I get the following error:

error : 'url_mmonit' failed protocol test [HTTP] at [slp-mon01.ajrubi.intern]:8443/index.csp [TCP/IP TLS] -- HTTP error: Regular expression doesn't match: No match

which has no much sense, because “Latest Status” exists in the main page.

Could you help me?

How to debug this in an easy way to find the correct monit syntax ? I mean that trial and error in the host section is a bit slower and I have no clues what is wrong.

Thanks a lot.

Comments (3)

  1. Tildeslash repo owner


    M/Monit uses Form authentication for the GUI access:

    The monit http protocol test username+password can be used for Basic authentication (different method), which can be used for example to test the M/Monit collector, but not the GUI access.

    You can test M/Monit GUI login using custom “check program”, see here for more details:

  2. Log in to comment