Monit in docker to monitor Domoticz
Posted: Wednesday 27 November 2024 16:05
Hi,
I run Domoticz outside a docker-container.
i installed Monit (see Domoticz wiki) in a docker-container.
I used a small monitrc-file

The docker-logs of Monit show several errors of files that does not exist, but checking the directories they DO EXIST.
a part of the log-file:
Is monit this way only monitoring docker-containers and not looking further?
Can anyone help?
thanks
I run Domoticz outside a docker-container.
i installed Monit (see Domoticz wiki) in a docker-container.
I used a small monitrc-file
Monit works but the monitoring of Domoticz failed with status error " Execution failed | Does not exist "cd /init.dset daemon 60
set log syslog
set httpd port 2812 and
allow admin:monit
check process domoticz with pidfile /var/run/domoticz.pid
# start program = "/usr/bin/sudo /bin/systemctl start domoticz.service"
# stop program = "/usr/bin/sudo /bin/systemctl stop domoticz.service"
# use below start/stop command for older systems not using systemctl
start program = "/etc/init.d/domoticz.sh start"
stop program = "/etc/init.d/domoticz.sh stop"
if failed
url http://127.0.0.1:8080/json.htm?type=com ... getversion
and content = '"status" : "OK"'
for 2 cycles
then restart
if 5 restarts within 5 cycles then exec "/sbin/reboot"

The docker-logs of Monit show several errors of files that does not exist, but checking the directories they DO EXIST.
a part of the log-file:
'domoticz' trying to restart
'domoticz' start: '/etc/init.d/domoticz.sh start'
'domoticz' process is not running
'domoticz' failed to start (exit status -1) -- Program /etc/init.d/domoticz.sh failed: File '/etc/init.d/domoticz.sh' does not exist
'domoticz' trying to restart
'domoticz' start: '/etc/init.d/domoticz.sh start'
'domoticz' process is not running
'domoticz' failed to start (exit status -1) -- Program /etc/init.d/domoticz.sh failed: File '/etc/init.d/domoticz.sh' does not exist
'domoticz' trying to restart
'domoticz' start: '/etc/init.d/domoticz.sh start'
'domoticz' service restarted 5 times within 5 cycles(s) - exec
Error: Could not execute /sbin/reboot
'domoticz' process is not running

Is monit this way only monitoring docker-containers and not looking further?
Can anyone help?
thanks