I am running Domoticz for a few years now and i'm very satisfied.
Sadly once in a while, the whole system crashes and i don't know where to start looking.
The general log didn't give me a clue.
Someone suggested me to install Monit.
Well, i did that, but i guess I'm doing something wrong.
When i run "sudo /etc/init.d/monit restart" i get the message
Running systemctl status monit.service gives the following information:[....] Restarting monit (via systemctl): monit.serviceJob for monit.service failed because the control process exited with error code.
See "systemctl status monit.service" and "journalctl -xe" for details.
Am i doing something wrong?systemctl status monit.service
● monit.service - LSB: service and resource monitoring daemon
Loaded: loaded (/etc/init.d/monit; generated)
Active: failed (Result: exit-code) since Thu 2020-08-13 20:28:45 CEST; 1min 35s ago
Docs: man:systemd-sysv-generator(8)
Process: 21527 ExecStart=/etc/init.d/monit start (code=exited, status=1/FAILURE)
Aug 13 20:28:45 Domoticz systemd[1]: Starting LSB: service and resource monitoring daemon...
Aug 13 20:28:45 Domoticz monit[21527]: Starting daemon monitor: monit'check system' not defined in c
Aug 13 20:28:45 Domoticz monit[21527]: /etc/monit/monitrc:216: Service name conflict, Domoticz alrea
Aug 13 20:28:45 Domoticz monit[21527]: failed!
Aug 13 20:28:45 Domoticz systemd[1]: monit.service: Control process exited, code=exited, status=1/FA
Aug 13 20:28:45 Domoticz systemd[1]: monit.service: Failed with result 'exit-code'.
Aug 13 20:28:45 Domoticz systemd[1]: Failed to start LSB: service and resource monitoring daemon.
Here are some snippets from my monitrc:
Code: Select all
#
set daemon 300 # check services at 2-minute intervals
with start delay 300 # optional: delay the first check by 4-minutes (by
# # default Monit check immediately after Monit start)
#
#
## Set syslog logging. If you want to log to a standalone log file instead,
## specify the full path to the log file
#
set log /var/log/monit.log
...
set httpd port 2812 and
# use address localhost # only accept connection from localhost (drop if you use M/Monit)
allow 192.168.2.1/255.255.255.0 # allow localhost to connect to the server and
allow localhost
allow admin:monit # require user 'admin' with password 'monit'
...
check process domoticz with pidfile /var/run/domoticz.pid
start program = "/etc/init.d/domoticz.sh start"
stop program = "/etc/init.d/domoticz.sh stop"
if failed
url http://192.168.2.100:8080/json.htm?type=command¶m=getversion
and content = '"status" : "OK"'
for 2 cycles
then restart
if 5 restarts within 5 cycles then exec "/sbin/reboot"