Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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!

like image 803
Vor Avatar asked Aug 31 '25 03:08

Vor


2 Answers

You should be looking for CPU Wait, since that would be your biggest indicator of I/O wait issues:

check system $HOST
   if loadavg (15min) > 6 then alert
   if memory usage > 90% then alert
   if swap usage > 5% then alert
   if cpu usage (user) > 70% then alert
   if cpu usage (system) > 30% then alert
   if cpu usage (wait) > 30% then alert
   group system_resources
like image 176
dasunsrule32 Avatar answered Sep 03 '25 03:09

dasunsrule32


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

like image 27
DeFeNdog Avatar answered Sep 03 '25 02:09

DeFeNdog