サーバーを監視しようとしていますが、ダウンしたときにサーバーを再起動したいだけです。以下は私のモニターコントロールです
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.
これを修正するにはどうすればよいですか? 私はいくつかの間違いを犯していますか?
また、「send」と「expect」を使用しようとすると、次のようなエラーが発生します
Erro: syntax error 'send'.