Search code examples
linuxiodisksystem-administrationmonit

How to monit disk I/O with monit?


Currently I'm using M/Monit to monitor a lot of instances at once. But Iwould also like to know if anyone tried to monitor Disk I/O with monit? I don't have any good knowledge about disks, so if someone could point me to the right direction or share some shell script would be great!


Solution

  • I wonder if this is what you're looking for:

    check filesystem datafs with path /dev/sdb1
     group server
     start program  = "/bin/mount /data"
     stop program  =  "/bin/umount /data"
     if failed permission 660 then unmonitor
     if failed uid root then unmonitor
     if failed gid disk then unmonitor
     if space usage > 80 % then alert
     if space usage > 94 % then stop
     if inode usage > 80 % then alert
     if inode usage > 94 % then stop
     alert root@localhost
    

    Taken from: http://mmonit.com/monit/documentation/monit.html#examples