Skip to content

Instantly share code, notes, and snippets.

@gsmitheidw
Created June 23, 2016 16:52
Show Gist options
  • Save gsmitheidw/3adafb6fc05835dcf6fc5ff4875543e2 to your computer and use it in GitHub Desktop.
Save gsmitheidw/3adafb6fc05835dcf6fc5ff4875543e2 to your computer and use it in GitHub Desktop.
Monit snippets for /etc/monitrc
check program SMART_sda with path "/usr/sbin/smartctl -d sat+megaraid,1 -H /dev/sda" every 60 cycles
if status != 4 then alert
check program DisksTemp with path "/usr/local/etc/monit/scripts/sdatmp.sh" with timeout 60 seconds
if status > 37 then alert
alert myemail@address
# Check esxi hosts
check host esxi-120 with address 192.168.1.120
if failed icmp type echo for 5 cycles then alert
if failed port 902 type tcp for 5 cycles then alert
alert myemail@address
# Check apache or other service that doesn't have a pid
check process apache2 matching "apache2"
if failed port 80 type tcp then alert
if failed port 443 type tcp then alert
check filesystem sde1 with path /dev/sde1
if space usage > 80% then alert
if changed fsflags then alert
# iops and backuppc - these two need some tuning
check program backupio with path "/usr/sbin/iotop -botqqq -u backuppc --iter=5" with timeout 20 seconds
if status != 0 then alert
check program sde_io_mnt.edu with path "/usr/bin/iostat -d -p sde -m" with timeout 5 seconds
if status !=0 then alert
# remote oracle host
check host Oracle with address 192.168.1.7
if failed port 1521 type tcp then alert
if failed ping with timeout 10 seconds then alert
#flexlm based licence server
check host flexlm with address 192.168.1.200
if failed port 27000 type tcp then alert
if failed ping with timeout 10 seconds then alert
check host remote-iscsi-link with address remote-iscsi-site.com
if failed port 3260 type tcp then alert
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment