我的系统正在运行 monit 5.19。当我启动 Monit 时,我看到错误syntax error 'status'
Status 似乎从 5.8 开始受支持,所以我不确定问题是什么。
这是由以下指令引起的。
check host nlb with address host
if failed
port 443
protocol HTTPS
request "/healthcheck"
ssl options {verify: disable}
timeout 15 seconds
status = 200
then restart
答案1
该status
条款是声明的一部分proto http
,因此需要位于该ssl
行之前(不是的一部分)。请参阅atproto http
的定义proto http
https://mmonit.com/monit/documentation/monit.html#HTTP...
PROTO(COL) HTTP
[USERNAME "string"]
[PASSWORD "string"]
[REQUEST "string"]
[STATUS operator number]
[CHECKSUM checksum]
[HTTP HEADERS list of headers]
[CONTENT < "=" | "!=" > STRING]
没有给出错误的文件版本是
check host nlb with address host
if failed
port 443
protocol HTTPS
request "/healthcheck"
status = 200
ssl options {verify: disable}
timeout 15 seconds
then restart