

See also the monit documentation: Pausing Monit (for updating Domoticz by hand for example) You can also run monit in 'verbose' mode, so you can see what it does. This also applies to the Raspberry Pi 2 i think, because it has a quadcore processor (Raspberry Pi 1 has a single core processor). If you have a system with 4 cores (quadcore), a process is hogging up CPU when it is > 25% (100 / 4 = 25). So if you want to restart a process when it consumes 100% CPU or more, you need to divide 100 by the amount of cores you have. When you want to monitor the CPU-usage of a single process (instead of the whole machine), be warned about this: īasically, monit sees the usage spreaded on all processorcores. Notes Pay attention when monitoring CPU-usage of process Once you have configured all of the above steps, Domoticz will be tracked constantly and the process will be restarted automatically if it would have stopped running because of. Typing the command below displays monit’s status Monit can be started with a command that then keeps it running in the background Once you have set up the configuration, check the syntax:Īfter resolving any possible syntax errors, you can start running all of the monitored programs. Note: For monit 70% for 3 cycles then restart for example (put it between the 'then restart' and the last 'if 5 restarts.' line). I would recommend doing this, so you have a good view on stability of your system (how often does Monit needs to kick in actually?).
#Monit log file monitoring update#
You can setup Monit to inform you about every status update by e-mail. set logfile /var/log/monit.log -> It is preferred to change the location of the logfile to a mounted pen drive or HDD.with start delay 300 -> Start checking the services after 300 seconds (this avoids bootloops if Domoticz has not started yet, give it some time to start fully).set daemon 300 -> Check services at 300 seconds (5 minutes).(I have changed this to my ramdisk check Wiki) By default, it is set up to check that services are running every 2 minutes and stores its log file in "/var/log/monit.log". Monit is very easy to use nearly out of the box. Once Monit has been installed, you can add programs and processes that you want to have checked, to the configuration file: This tutorial will cover the most basic setup and configuration to ensure Domoticz running 24/7. Additionally Monit comes with a basic web interface through which all of the processes can be set up. Monit is a helpful program that automatically monitors and manages server programs to ensure that they not only stay online consistently, but that the file size, checksum, or permissions are always correct. 1.5.2 Pausing Monit (for updating Domoticz by hand for example).1.5.1 Pay attention when monitoring CPU-usage of process.
