Automatic monitoring of LM2 processes
Example: Automatic monitoring of Logic Machine system processes
Program
We strongly recommend to add the following program into Network Configuration –> Services –> System monitoring
- # check once in 2 minutes
- set daemon 120
- # reboot system when memory or cpu usage is too high
- check system $HOST
- if cpu usage (user) > 90% for 15 cycles then exec "/sbin/reboot"
- if memory usage > 90% for 5 cycles then exec "/sbin/reboot"
- # http server
- check process uhttpd with pidfile /var/run/uhttpd_httpd.pid
- start program = "/etc/init.d/httpd restart"
- stop program = "/etc/init.d/httpd stop"
- if failed port 80 with timeout 15 seconds then restart
- # knx backend
- check process eibd with pidfile /var/run/eibd
- start program = "/etc/init.d/eibd restart"
- stop program = "/etc/init.d/eibd stop"
- if 5 restarts within 5 cycles then timeout
- # knx monitor
- check process groupmonitor with pidfile /var/run/gs-groupmonitor.pid
- start program = "/etc/init.d/genohm-scada restart"
- stop program = "/etc/init.d/genohm-scada stop"
- if 5 restarts within 5 cycles then timeout