28 lines
1.7 KiB
Plaintext
28 lines
1.7 KiB
Plaintext
check system $HOST
|
|
#SystemLoad
|
|
if loadavg (5min) > 4 then exec "/opt/MonitNotify.sh 'SYS-WARN:: High load (5min)'"
|
|
else if recovered then exec "/opt/MonitNotify.sh 'SYS-OK: load (5min)'"
|
|
if loadavg (15min) > 2 then exec "/opt/MonitNotify.sh 'SYS-WARN:: High load (15min)'"
|
|
else if recovered then exec "/opt/MonitNotify.sh 'SYS-OK: load (15min)'"
|
|
|
|
#Memory
|
|
if memory usage > 90% for 4 cycles then exec "/opt/MonitNotify.sh 'WARN: Memory threshold'"
|
|
else if recovered then exec "/opt/MonitNotify.sh 'SYS-OK: Memory threshold'"
|
|
if swap usage > 20% for 4 cycles then exec "/opt/MonitNotify.sh 'SYS-WARN: Swap threshold'"
|
|
else if recovered then exec "/opt/MonitNotify.sh 'SYS-OK: Swap threshold'"
|
|
|
|
#CPU
|
|
if cpu usage (user) > 90% for 4 cycles then exec "/opt/MonitNotify.sh 'SYS-WARN: CPU(user) threshold'"
|
|
else if recovered then exec "/opt/MonitNotify.sh 'SYS-OK: CPU(user) threshold'"
|
|
if cpu usage (system) > 80% for 4 cycles then exec "/opt/MonitNotify.sh 'SYS-WARN: CPU(sys) threshold'"
|
|
else if recovered then exec "/opt/MonitNotify.sh 'SYS-OK: CPU(sys) threshold'"
|
|
if cpu usage (wait) > 80% for 4 cycles then exec"/opt/MonitNotify.sh 'SYS-WARN: CPU(wait) threshold'"
|
|
else if recovered then exec "/opt/MonitNotify.sh 'SYS-OK: CPU(wait) threshold'"
|
|
if cpu usage > 200% for 4 cycles then exec "/opt/MonitNotify.sh "/opt/MonitNotify.sh 'SYS-WARN: CPU threshold'"
|
|
else if recovered then exec "/opt/MonitNotify.sh 'SYS-OK: CPU threshold'"
|
|
|
|
#Disk
|
|
check device rootfs with path /
|
|
if SPACE usage > 80% then exec "/opt/MonitNotify.sh 'SYS-WARN: Disk quota'"
|
|
else if recovered then exec "/opt/MonitNotify.sh 'SYS-OK: Disk quota'"
|