- marked as minor
Syntax check is OK, but fails to start
Issue #922
closed
I’ve got a simple config, which after checking with syntax check suggests that it’s ok, but when I try to start it, reports an error near every.
$ monit -t ./monitrc-test
Control file syntax OK
$ monit -c ./monitrc-test
/path/to/monitrc-test:8: syntax error 'every'
$ cat ./monitrc-test
set daemon 60
with start delay 30
check host server1 with address 10.10.10.10
if failed ping then alert
if failed port 443 with protocol https
and certificate valid > 14 days use ssl options {verify: enable}
every 240 cycles
then alert
Monit 5.27.0, macOS installed via Homebrew, but reproducible with 5.26.0 on alpine linux.
Comments (3)
-
reporter -
repo owner You need to set the
-c
switch when you runmonit -t
also, otherwise monit will use it's default control-file. The error is correct. You have an every statement inside an if-statement. every belongs with the check itself, so it readscheck X every y
. -
reporter Thanks. I failed at adding -c option.
- Log in to comment