abhi.gupta200297
abhi.gupta200297

Reputation: 891

Monit Syntax Error

I am using Monit v5.5 and trying to set a check for apache. Everything below is as per the documentation. However, when i say monit -t, i get /etc/monit.conf:155: Error: syntax error 'http' which points to the HTTP HEADERS line. Commenting it out works fine. Same issue with content = "WrongPath". Can anybody point me in the right direction?

check host mysite with address mysite.com
    start program = "/usr/sbin/httpd start"
    stop program = "/usr/sbin/httpd stop"
    if failed port 80 protocol http
       with http headers [Host: mysite.com, Cache-Control: no-cache]
       and request "/pingtest.html" with content = "WrongPath"
    then restart
    if 5 restarts within 10 cycles then timeout

Upvotes: 0

Views: 3012

Answers (1)

kev
kev

Reputation: 161864

Your version is too old, HTTP HEADERS feature is in version 5.9. Please read this.

Upvotes: 1

Related Questions