I’m trying to use monit on Fedora FC39 and I’m strugling with a particular service I want to monitor
here is the service monit configuration file
CHECK PROGRAM domoticz PATH "/usr/bin/systemctl --quiet is-active domoticz" TIMEOUT 5 SECONDS
START PROGRAM = "/bin/systemctl start domoticz"
STOP PROGRAM = "/bin/systemctl stop domoticz"
IF FAILED
ADDRESS 127.0.0.1
PORT 8080
PROTOCOL http
REQUEST "/json.htm?type=command¶m=getversion"
STATUS = 200
FOR 2 CYCLES
THEN exec "/bin/systemctl restart domoticz else if succeeded then exec "/var/lib/domoticz/pushover-notification.sh 'domoticz restarted'"
IF 5 restarts within 5 cycles then exec "/sbin/reboot"
everytime I run monit -t, I get /etc/monit.d/domoticz:4: syntax error 'FAILED'
monit --version
This is Monit version 5.33.0
Built with ssl, with ipv6, with compression, with pam and with large files
Copyright (C) 2001-2022 Tildeslash Ltd. All Rights Reserved.
would appreciate any help, as I really don’t understand the issue
I look after stackoverflow for similar problem but no success
New contributor
user18966243 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.