目前我正在使用M/Monit
同时监控很多实例。但是我想知道是否有人尝试使用Monit来监控磁盘I/O?我对磁盘没有什么好的了解,所以如果有人能指导我方向或分享一些shell脚本就太好了!
目前我正在使用M/Monit
同时监控很多实例。但是我想知道是否有人尝试使用Monit来监控磁盘I/O?我对磁盘没有什么好的了解,所以如果有人能指导我方向或分享一些shell脚本就太好了!
您应该查找CPU等待时间,因为这将是您I/O等待问题的最大指标:
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
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
摘自:http://mmonit.com/monit/documentation/monit.html#examples
Monit 是一个小型的开源工具,可用于管理和监控 Unix 系统上的进程、文件系统、网络连接和其他资源。它可以自动化常见系统管理任务,如启动或停止服务、重新启动崩溃的服务以及发送警报。
以下是 Monit 的一些示例用法:
使用 Monit 可以提高系统的稳定性和安全性。它还提供了 Web 界面,方便用户进行配置和管理。