我正在尝试监视我的服务器,并且只想在它关闭时重新启动它。以下是我的监控
check process myserver with pidfile "/home/path/to/myserver.pid"
start program = "/etc/init.d/myserver start"
stop program = "/etc/init.d/myserver stop"
if failed host 127.0.0.1 port 8080 protocol http
then restart
但即使服务器正在运行 monit 也会出现如下错误:
'myserver' process not running
trying to restart 'myserver'
failed to restart myserver.
我该如何解决?我犯了一些错误吗?
此外,当我尝试使用“发送”和“期望”时,它会出现类似错误
Erro: syntax error 'send'.