Page 1 of 1

Monit : how to monitor Phoscon/deconz

Posted: Friday 11 March 2022 17:43
by Patricen
Hello,

I am seeing that sometimes domoticz does not see sensors and I do have identified that the issue is coming from Phoscon / Deconz that is freezed.
I'm really not skilled with processes and pid, can somebody help me configuring monit so that deconz/Phoscon is monitored and restarted if freezed?

Thanks

Re: Monit : how to monitor Phoscon/deconz

Posted: Saturday 12 March 2022 9:25
by JBN
How do you know that the process is hung or slow to respond?

If the CPU is high, perhaps something like this?

check deCONZ
matching "deCONZ"
start program = "/bin/systemctl start deCONZ" with timeout 30 seconds
stop program = "/bin/systemctl stop deCONZ"
if cpu usage > 80% for 2 cycles then restart

But personally I would try to see if the API is unresponsive by either parsing the Domoticz logs (ie a Phython hack) or simply calling the API (also something like Phython).

Re: Monit : how to monitor Phoscon/deconz

Posted: Saturday 12 March 2022 13:12
by Patricen
Excellent, thanks for the clues!