Monit语法错误

时间:2014-12-20 14:15:23

标签: monit

我正在使用Monit v5.5并尝试设置apache检查。以下所有内容均符合文档。但是,当我说monit -t时,我得到/etc/monit.conf:155: Error: syntax error 'http'指向HTTP HEADERS行。评论出来的效果很好。与content = "WrongPath"相同的问题。任何人都能指出我正确的方向吗?

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

1 个答案:

答案 0 :(得分:1)

您的版本太旧,HTTP HEADERS功能版本为5.9。请阅读this