rr322w 发表于 2015-10-30 08:59:56

Linux zabbix IO监控 步骤脚本和模板

Linux zabbix IO监控
监控原理
通过定时监控iostata -dx 1 输出数据采集硬盘IO
1.服务器安装
yum install sysstat

#iostat 工具安装

2.设置本机计划任务
crontab -e
*/3 * * * */usr/bin/iostat -dxkt 1 500 >/tmp/iostat_output

3.增加监控脚本
mkdir/etc/zabbix/scripts
#上传硬盘发现脚本
disk_discovery.sh
#上传硬盘脚本
disk_status.sh

4.增加监控配置文件
### Option: UserParameter
#       User-defined parameter to monitor. There can be several user-defined parameters.
#       Format: UserParameter=<key>,<shell command>
#       See 'zabbix_agentd' directory for examples.
#       by xzm net592#qq.com
# Mandatory: no
# Default:
# UserParameter=
UserParameter=disk.discovery,/etc/zabbix/scripts/disk_discovery.sh
UserParameter=disk.status[*],/etc/zabbix/scripts/disk_status.sh $1 $2

5.导入监控模板
Template_DiskIO_Discovery




6.设置硬盘发现规则z
确保模板调用该规则发现

7.Ok

页: [1]
查看完整版本: Linux zabbix IO监控 步骤脚本和模板