0

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
Mureinik
  • 297,002
  • 52
  • 306
  • 350
abhi.gupta200297
  • 881
  • 6
  • 12

1 Answers1

1

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

kev
  • 155,172
  • 47
  • 273
  • 272