2018-10-22 Monit and Oddmuse 6

I noticed that my Monit setup for Oddmuse 6 isn’t working.

check process oddmuse6 with pidfile /home/alex/oddmuse6/pid
    start program = "/home/alex/bin/oddmuse6" as uid alex gid alex
    restart program = "/home/alex/bin/oddmuse6" as uid alex gid alex
    stop program = "/bin/kill `cat /home/alex/oddmuse6/pid`" as uid alex gid alex
    if failed host next.oddmuse.org port 443 protocol https
      and request "/view/Monit" for 5 cycles then restart
    if totalmem > 1500 MB for 5 cycles then restart
    if 6 restarts within 15 cycles then timeout

monit status oddmuse6 gives me:

FAILED to [next.oddmuse.org]:443/view/Monit type TCP/IP using SSL/TLS protocol HTTP

Everything seems to be working, however. Finally I decided to try curl and look at the headers.

$ curl -I https://next.oddmuse.org:443/view/Monit
HTTP/1.1 405 Method Not Allowed

Then I realized: this is HEAD vs. GET requests!

Confirmation in the Apache log. There’s the 405 status code again.

next.oddmuse.org:443 - - [22/Oct/2018:09:36:52 +0200] "HEAD /view/Monit HTTP/1.1" 405 4561 "-" "Monit/5.20.0"

Clearly, I need to start working on caching and handling HEAD requests in Oddmuse 6!



Please make sure you contribute only your own work, or work licensed under the GNU Free Documentation License. Note: in order to facilitate peer review and fight vandalism, we will store your IP number for a number of days. See Privacy Policy for more information. See Info for text formatting rules. You can edit the comment page if you need to fix typos. You can subscribe to new comments by email without leaving a comment.

To save this page you must answer this question:

Please say HELLO.