最近,我发现zabbix没有监控linux的磁盘io,于是借助百度,我做了一个zabbix模板,用来监控磁盘io。
1、添加自动寻找磁盘脚本:
cat /home/monitor/disk_scan.sh
######################################
#!/bin/bash
#written by lenwood
#mail:ccyhaoran@live.cn
diskarray=(`cat /proc/diskstats |grep -E "\bsd[abcdefg]\b|\bxvd[abcdefg]\b"|grep -i "\b$1\b"|awk '{print $3}'|sort|uniq 2>/dev/null`)
length=${#diskarray[@]}
printf "{\n"
printf '\t'"\"data\":["
for ((i=0;i<$length;i++))
do
printf '\n\t\t{'
printf "\"{#DISK_NAME}\":\"${diskarray[$i]}\"}"
if [ $i -lt $[$length-1] ];then
printf ','
fi
done
printf "\n\t]\n"
printf "}\n"
###########################
注释:grep -E 里面的\b表示匹配空字符串的意思。
The Backslash Character and Special Expressions
The symbols \< and \> respectively match the empty string at the
beginning and end of a word. The symbol \b matches the empty string at
the edge of a word, and \B matches the empty string provided it’s not
at the edge of a word. The symbol \w is a synonym for [[:alnum:]] and
\W is a synonym for [^[:alnum:]].
2、后台执行iostat命令
nohup iostat -m -x -d 30 > /home/script/log/iostat_output &
-c 仅显示CPU统计信息.与-d选项互斥.
-d 仅显示磁盘统计信息.与-c选项互斥.
-k 以K为单位显示每秒的磁盘请求数,默认单位块.
-p device | ALL
与-x选项互斥,用于显示块设备及系统分区的统计信息.也可以在-p后指定一个设备名,如:
# iostat -p hda
或显示所有设备
# iostat -p ALL
-t 在输出数据时,打印搜集数据的时间.
-V 打印版本号和帮助信息.
-x 输出扩展信息.
-m 以兆为单位
3、为了下次开启也生效,把上述的nohup iostat命令加入/etc/rc.local里面
4、在zabbix_agentd.conf中加入如下UserParameters:
############################
#通过iostat -m -x -d 30 获得的磁盘io信息
UserParameter=io.scandisk[*],/home/script/disk_scan.sh $1
UserParameter=io.rps[*],/usr/bin/tail /home/script/log/iostat_output |grep "\b$1\b"|tail -1|awk '{print $$4}'
UserParameter=io.wps[*],/usr/bin/tail /home/script/log/iostat_output |grep "\b$1\b" |tail -1|awk '{print $$5}'
UserParameter=io.rMBps[*],/usr/bin/tail /home/script/log/iostat_output |grep "\b$1\b" |tail -1|awk '{print $$6}'
UserParameter=io.wMBps[*],/usr/bin/tail /home/script/log/iostat_output |grep "\b$1\b" |tail -1|awk '{print $$7}'
UserParameter=io.avgrq-sz[*],/usr/bin/tail /home/script/log/iostat_output |grep "\b$1\b" |tail -1|awk '{print $$8}'
UserParameter=io.avgqu-sz[*],/usr/bin/tail /home/script/log/iostat_output |grep "\b$1\b" |tail -1|awk '{print $$9}'
UserParameter=io.await[*],/usr/bin/tail /home/script/log/iostat_output |grep "\b$1\b" |tail -1|awk '{print $$10}'
UserParameter=io.svctm[*],/usr/bin/tail /home/script/log/iostat_output |grep "\b$1\b" |tail -1|awk '{print $$11}'
UserParameter=io.util[*],/usr/bin/tail /home/script/log/iostat_output |grep "\b$1\b" |tail -1|awk '{print $$12}'
#通过cat /proc/diskstats获得的磁盘io信息
UserParameter=custom.vfs.dev.read.ops[*],cat /proc/diskstats | grep $1 | head -1 | awk '{print $$4}'
UserParameter=custom.vfs.dev.read.ms[*],cat /proc/diskstats | grep $1 | head -1 | awk '{print $$7}'
UserParameter=custom.vfs.dev.write.ops[*],cat /proc/diskstats | grep $1 | head -1 | awk '{print $$8}'
UserParameter=custom.vfs.dev.write.ms[*],cat /proc/diskstats | grep $1 | head -1 | awk '{print $$11}'
UserParameter=custom.vfs.dev.io.active[*],cat /proc/diskstats | grep $1 | head -1 | awk '{print $$12}'
UserParameter=custom.vfs.dev.io.ms[*],cat /proc/diskstats | grep $1 | head -1 | awk '{print $$13}'
UserParameter=custom.vfs.dev.read.sectors[*],cat /proc/diskstats | grep $1 | head -1 | awk '{print $$6}'
UserParameter=custom.vfs.dev.write.sectors[*],cat /proc/diskstats | grep $1 | head -1 | awk '{print $$10}'
##################
5、重启zabbix agent
/etc/init.d/zabbix_agentd restart
6、确认zabbix agent是否启动
[ ps -elf |grep zabbix
7、导入我弄的模板:linux磁盘io模板-czxin
8、关联你要监控的主机
####################
参考资料:
http://www.tuicool.com/articles/eqERru
http://blog.chinaunix.net/uid-26446098-id-4964263.html
附件列表
zabbix监控磁盘io的模板
zbx_export_templates.xml
点击(此处)折叠或打开
-
<?xml version="1.0" encoding="UTF-8"?>
-
<zabbix_export>
-
<version>2.0</version>
-
<date>2015-11-28T15:38:34Z</date>
-
<groups>
-
<group>
-
<name>378-软件构型管理系统V1.0</name>
-
</group>
-
</groups>
-
<templates>
-
<template>
-
<template>disk_io_template</template>
-
<name>linux磁盘io模板-czxin</name>
-
<description/>
-
<groups>
-
<group>
-
<name>378-软件构型管理系统V1.0</name>
-
</group>
-
</groups>
-
<applications>
-
<application>
-
<name>disk_io_iostat(通过iostat -m -x -d 30截取的参数)</name>
-
</application>
-
<application>
-
<name>disk_io_proc(通过cat /proc/diskstats截取的数值)</name>
-
</application>
-
</applications>
-
<items>
-
<item>
-
<name>Disk:$1:Read:Bytes/sec(每秒读磁盘的字节数))</name>
-
<type>0</type>
-
<snmp_community/>
-
<multiplier>1</multiplier>
-
<snmp_oid/>
-
<key>custom.vfs.dev.read.sectors[sda]</key>
-
<delay>30</delay>
-
<history>90</history>
-
<trends>365</trends>
-
<status>0</status>
-
<value_type>3</value_type>
-
<allowed_hosts/>
-
<units>B/sec</units>
-
<delta>1</delta>
-
<snmpv3_contextname/>
-
<snmpv3_securityname/>
-
<snmpv3_securitylevel>0</snmpv3_securitylevel>
-
<snmpv3_authprotocol>0</snmpv3_authprotocol>
-
<snmpv3_authpassphrase/>
-
<snmpv3_privprotocol>0</snmpv3_privprotocol>
-
<snmpv3_privpassphrase/>
-
<formula>512</formula>
-
<delay_flex/>
-
<params/>
-
<ipmi_sensor/>
-
<data_type>0</data_type>
-
<authtype>0</authtype>
-
<username/>
-
<password/>
-
<publickey/>
-
<privatekey/>
-
<port/>
-
<description/>
-
<inventory_link>0</inventory_link>
-
<applications>
-
<application>
-
<name>disk_io_proc(通过cat /proc/diskstats截取的数值)</name>
-
</application>
-
</applications>
-
<valuemap/>
-
<logtimefmt/>
-
</item>
-
<item>
-
<name>Disk:$1:Read:ms(每次读磁盘花费的毫秒数)</name>
-
<type>0</type>
-
<snmp_community/>
-
<multiplier>0</multiplier>
-
<snmp_oid/>
-
<key>custom.vfs.dev.read.ms[sda]</key>
-
<delay>30</delay>
-
<history>90</history>
-
<trends>365</trends>
-
<status>0</status>
-
<value_type>0</value_type>
-
<allowed_hosts/>
-
<units>ms</units>
-
<delta>1</delta>
-
<snmpv3_contextname/>
-
<snmpv3_securityname/>
-
<snmpv3_securitylevel>0</snmpv3_securitylevel>
-
<snmpv3_authprotocol>0</snmpv3_authprotocol>
-
<snmpv3_authpassphrase/>
-
<snmpv3_privprotocol>0</snmpv3_privprotocol>
-
<snmpv3_privpassphrase/>
-
<formula>1</formula>
-
<delay_flex/>
-
<params/>
-
<ipmi_sensor/>
-
<data_type>0</data_type>
-
<authtype>0</authtype>
-
<username/>
-
<password/>
-
<publickey/>
-
<privatekey/>
-
<port/>
-
<description/>
-
<inventory_link>0</inventory_link>
-
<applications>
-
<application>
-
<name>disk_io_proc(通过cat /proc/diskstats截取的数值)</name>
-
</application>
-
</applications>
-
<valuemap/>
-
<logtimefmt/>
-
</item>
-
<item>
-
<name>Disk:$1:Read:ops per second(每秒磁盘读的次数)</name>
-
<type>0</type>
-
<snmp_community/>
-
<multiplier>1</multiplier>
-
<snmp_oid/>
-
<key>custom.vfs.dev.read.ops[sda]</key>
-
<delay>30</delay>
-
<history>90</history>
-
<trends>365</trends>
-
<status>0</status>
-
<value_type>0</value_type>
-
<allowed_hosts/>
-
<units>ops/second</units>
-
<delta>1</delta>
-
<snmpv3_contextname/>
-
<snmpv3_securityname/>
-
<snmpv3_securitylevel>0</snmpv3_securitylevel>
-
<snmpv3_authprotocol>0</snmpv3_authprotocol>
-
<snmpv3_authpassphrase/>
-
<snmpv3_privprotocol>0</snmpv3_privprotocol>
-
<snmpv3_privpassphrase/>
-
<formula>512</formula>
-
<delay_flex/>
-
<params/>
-
<ipmi_sensor/>
-
<data_type>0</data_type>
-
<authtype>0</authtype>
-
<username/>
-
<password/>
-
<publickey/>
-
<privatekey/>
-
<port/>
-
<description/>
-
<inventory_link>0</inventory_link>
-
<applications>
-
<application>
-
<name>disk_io_proc(通过cat /proc/diskstats截取的数值)</name>
-
</application>
-
</applications>
-
<valuemap/>
-
<logtimefmt/>
-
</item>
-
<item>
-
<name>Disk:$1:Write:Bytes/sec(每秒磁盘写的字节数)</name>
-
<type>0</type>
-
<snmp_community/>
-
<multiplier>1</multiplier>
-
<snmp_oid/>
-
<key>custom.vfs.dev.write.sectors[sda]</key>
-
<delay>30</delay>
-
<history>90</history>
-
<trends>365</trends>
-
<status>0</status>
-
<value_type>3</value_type>
-
<allowed_hosts/>
-
<units>B/sec</units>
-
<delta>1</delta>
-
<snmpv3_contextname/>
-
<snmpv3_securityname/>
-
<snmpv3_securitylevel>0</snmpv3_securitylevel>
-
<snmpv3_authprotocol>0</snmpv3_authprotocol>
-
<snmpv3_authpassphrase/>
-
<snmpv3_privprotocol>0</snmpv3_privprotocol>
-
<snmpv3_privpassphrase/>
-
<formula>512</formula>
-
<delay_flex/>
-
<params/>
-
<ipmi_sensor/>
-
<data_type>0</data_type>
-
<authtype>0</authtype>
-
<username/>
-
<password/>
-
<publickey/>
-
<privatekey/>
-
<port/>
-
<description/>
-
<inventory_link>0</inventory_link>
-
<applications>
-
<application>
-
<name>disk_io_proc(通过cat /proc/diskstats截取的数值)</name>
-
</application>
-
</applications>
-
<valuemap/>
-
<logtimefmt/>
-
</item>
-
<item>
-
<name>Disk:$1:Write:ms(每次写磁盘花费的毫秒数)</name>
-
<type>0</type>
-
<snmp_community/>
-
<multiplier>0</multiplier>
-
<snmp_oid/>
-
<key>custom.vfs.dev.write.ms[sda]</key>
-
<delay>30</delay>
-
<history>90</history>
-
<trends>365</trends>
-
<status>0</status>
-
<value_type>3</value_type>
-
<allowed_hosts/>
-
<units>ms</units>
-
<delta>1</delta>
-
<snmpv3_contextname/>
-
<snmpv3_securityname/>
-
<snmpv3_securitylevel>0</snmpv3_securitylevel>
-
<snmpv3_authprotocol>0</snmpv3_authprotocol>
-
<snmpv3_authpassphrase/>
-
<snmpv3_privprotocol>0</snmpv3_privprotocol>
-
<snmpv3_privpassphrase/>
-
<formula>1</formula>
-
<delay_flex/>
-
<params/>
-
<ipmi_sensor/>
-
<data_type>0</data_type>
-
<authtype>0</authtype>
-
<username/>
-
<password/>
-
<publickey/>
-
<privatekey/>
-
<port/>
-
<description/>
-
<inventory_link>0</inventory_link>
-
<applications>
-
<application>
-
<name>disk_io_proc(通过cat /proc/diskstats截取的数值)</name>
-
</application>
-
</applications>
-
<valuemap/>
-
<logtimefmt/>
-
</item>
-
<item>
-
<name>Disk:$1:Write:ops per second(每秒写磁盘的次数)</name>
-
<type>0</type>
-
<snmp_community/>
-
<multiplier>0</multiplier>
-
<snmp_oid/>
-
<key>custom.vfs.dev.write.ops[sda]</key>
-
<delay>30</delay>
-
<history>90</history>
-
<trends>365</trends>
-
<status>0</status>
-
<value_type>3</value_type>
-
<allowed_hosts/>
-
<units>ops/second</units>
-
<delta>1</delta>
-
<snmpv3_contextname/>
-
<snmpv3_securityname/>
-
<snmpv3_securitylevel>0</snmpv3_securitylevel>
-
<snmpv3_authprotocol>0</snmpv3_authprotocol>
-
<snmpv3_authpassphrase/>
-
<snmpv3_privprotocol>0</snmpv3_privprotocol>
-
<snmpv3_privpassphrase/>
-
<formula>1</formula>
-
<delay_flex/>
-
<params/>
-
<ipmi_sensor/>
-
<data_type>0</data_type>
-
<authtype>0</authtype>
-
<username/>
-
<password/>
-
<publickey/>
-
<privatekey/>
-
<port/>
-
<description/>
-
<inventory_link>0</inventory_link>
-
<applications>
-
<application>
-
<name>disk_io_proc(通过cat /proc/diskstats截取的数值)</name>
-
</application>
-
</applications>
-
<valuemap/>
-
<logtimefmt/>
-
</item>
-
</items>
-
<discovery_rules>
-
<discovery_rule>
-
<name>io_status_discovery</name>
-
<type>0</type>
-
<snmp_community/>
-
<snmp_oid/>
-
<key>io.scandisk</key>
-
<delay>30</delay>
-
<status>0</status>
-
<allowed_hosts/>
-
<snmpv3_contextname/>
-
<snmpv3_securityname/>
-
<snmpv3_securitylevel>0</snmpv3_securitylevel>
-
<snmpv3_authprotocol>0</snmpv3_authprotocol>
-
<snmpv3_authpassphrase/>
-
<snmpv3_privprotocol>0</snmpv3_privprotocol>
-
<snmpv3_privpassphrase/>
-
<delay_flex/>
-
<params/>
-
<ipmi_sensor/>
-
<authtype>0</authtype>
-
<username/>
-
<password/>
-
<publickey/>
-
<privatekey/>
-
<port/>
-
<filter>
-
<evaltype>0</evaltype>
-
<formula/>
-
<conditions/>
-
</filter>
-
<lifetime>1</lifetime>
-
<description/>
-
<item_prototypes>
-
<item_prototype>
-
<name>IO_avgqu-sz(平均I/O队列长度) on $1</name>
-
<type>0</type>
-
<snmp_community/>
-
<multiplier>0</multiplier>
-
<snmp_oid/>
-
<key>io.avgqu-sz[{#DISK_NAME}]</key>
-
<delay>30</delay>
-
<history>90</history>
-
<trends>365</trends>
-
<status>0</status>
-
<value_type>0</value_type>
-
<allowed_hosts/>
-
<units>length</units>
-
<delta>0</delta>
-
<snmpv3_contextname/>
-
<snmpv3_securityname/>
-
<snmpv3_securitylevel>0</snmpv3_securitylevel>
-
<snmpv3_authprotocol>0</snmpv3_authprotocol>
-
<snmpv3_authpassphrase/>
-
<snmpv3_privprotocol>0</snmpv3_privprotocol>
-
<snmpv3_privpassphrase/>
-
<formula>1</formula>
-
<delay_flex/>
-
<params/>
-
<ipmi_sensor/>
-
<data_type>0</data_type>
-
<authtype>0</authtype>
-
<username/>
-
<password/>
-
<publickey/>
-
<privatekey/>
-
<port/>
-
<description/>
-
<inventory_link>0</inventory_link>
-
<applications>
-
<application>
-
<name>disk_io_iostat(通过iostat -m -x -d 30截取的参数)</name>
-
</application>
-
</applications>
-
<valuemap/>
-
<logtimefmt/>
-
</item_prototype>
-
<item_prototype>
-
<name>IO_avgrq-sz(平均每次设备I/O操作的数据大小 (扇区)) ON $1</name>
-
<type>0</type>
-
<snmp_community/>
-
<multiplier>0</multiplier>
-
<snmp_oid/>
-
<key>io.avgrq-sz[{#DISK_NAME}]</key>
-
<delay>30</delay>
-
<history>90</history>
-
<trends>365</trends>
-
<status>0</status>
-
<value_type>0</value_type>
-
<allowed_hosts/>
-
<units>扇区</units>
-
<delta>0</delta>
-
<snmpv3_contextname/>
-
<snmpv3_securityname/>
-
<snmpv3_securitylevel>0</snmpv3_securitylevel>
-
<snmpv3_authprotocol>0</snmpv3_authprotocol>
-
<snmpv3_authpassphrase/>
-
<snmpv3_privprotocol>0</snmpv3_privprotocol>
-
<snmpv3_privpassphrase/>
-
<formula>1</formula>
-
<delay_flex/>
-
<params/>
-
<ipmi_sensor/>
-
<data_type>0</data_type>
-
<authtype>0</authtype>
-
<username/>
-
<password/>
-
<publickey/>
-
<privatekey/>
-
<port/>
-
<description/>
-
<inventory_link>0</inventory_link>
-
<applications>
-
<application>
-
<name>disk_io_iostat(通过iostat -m -x -d 30截取的参数)</name>
-
</application>
-
</applications>
-
<valuemap/>
-
<logtimefmt/>
-
</item_prototype>
-
<item_prototype>
-
<name>IO_await(平均每次设备I/O操作的等待时间 (毫秒)) on $1</name>
-
<type>0</type>
-
<snmp_community/>
-
<multiplier>0</multiplier>
-
<snmp_oid/>
-
<key>io.await[{#DISK_NAME}]</key>
-
<delay>30</delay>
-
<history>90</history>
-
<trends>365</trends>
-
<status>0</status>
-
<value_type>0</value_type>
-
<allowed_hosts/>
-
<units>ms</units>
-
<delta>0</delta>
-
<snmpv3_contextname/>
-
<snmpv3_securityname/>
-
<snmpv3_securitylevel>0</snmpv3_securitylevel>
-
<snmpv3_authprotocol>0</snmpv3_authprotocol>
-
<snmpv3_authpassphrase/>
-
<snmpv3_privprotocol>0</snmpv3_privprotocol>
-
<snmpv3_privpassphrase/>
-
<formula>1</formula>
-
<delay_flex/>
-
<params/>
-
<ipmi_sensor/>
-
<data_type>0</data_type>
-
<authtype>0</authtype>
-
<username/>
-
<password/>
-
<publickey/>
-
<privatekey/>
-
<port/>
-
<description/>
-
<inventory_link>0</inventory_link>
-
<applications>
-
<application>
-
<name>disk_io_iostat(通过iostat -m -x -d 30截取的参数)</name>
-
</application>
-
</applications>
-
<valuemap/>
-
<logtimefmt/>
-
</item_prototype>
-
<item_prototype>
-
<name>IO_rMBps(每秒读兆字节数) on $1</name>
-
<type>0</type>
-
<snmp_community/>
-
<multiplier>0</multiplier>
-
<snmp_oid/>
-
<key>io.rMBps[{#DISK_NAME}]</key>
-
<delay>30</delay>
-
<history>90</history>
-
<trends>365</trends>
-
<status>0</status>
-
<value_type>0</value_type>
-
<allowed_hosts/>
-
<units>rMBps</units>
-
<delta>0</delta>
-
<snmpv3_contextname/>
-
<snmpv3_securityname/>
-
<snmpv3_securitylevel>0</snmpv3_securitylevel>
-
<snmpv3_authprotocol>0</snmpv3_authprotocol>
-
<snmpv3_authpassphrase/>
-
<snmpv3_privprotocol>0</snmpv3_privprotocol>
-
<snmpv3_privpassphrase/>
-
<formula>1</formula>
-
<delay_flex/>
-
<params/>
-
<ipmi_sensor/>
-
<data_type>0</data_type>
-
<authtype>0</authtype>
-
<username/>
-
<password/>
-
<publickey/>
-
<privatekey/>
-
<port/>
-
<description/>
-
<inventory_link>0</inventory_link>
-
<applications>
-
<application>
-
<name>disk_io_iostat(通过iostat -m -x -d 30截取的参数)</name>
-
</application>
-
</applications>
-
<valuemap/>
-
<logtimefmt/>
-
</item_prototype>
-
<item_prototype>
-
<name>IO_rps(每秒完成的读 I/O 设备次数) on $1</name>
-
<type>0</type>
-
<snmp_community/>
-
<multiplier>0</multiplier>
-
<snmp_oid/>
-
<key>io.rps[{#DISK_NAME}]</key>
-
<delay>30</delay>
-
<history>90</history>
-
<trends>365</trends>
-
<status>0</status>
-
<value_type>0</value_type>
-
<allowed_hosts/>
-
<units>rps</units>
-
<delta>0</delta>
-
<snmpv3_contextname/>
-
<snmpv3_securityname/>
-
<snmpv3_securitylevel>0</snmpv3_securitylevel>
-
<snmpv3_authprotocol>0</snmpv3_authprotocol>
-
<snmpv3_authpassphrase/>
-
<snmpv3_privprotocol>0</snmpv3_privprotocol>
-
<snmpv3_privpassphrase/>
-
<formula>1</formula>
-
<delay_flex/>
-
<params/>
-
<ipmi_sensor/>
-
<data_type>0</data_type>
-
<authtype>0</authtype>
-
<username/>
-
<password/>
-
<publickey/>
-
<privatekey/>
-
<port/>
-
<description/>
-
<inventory_link>0</inventory_link>
-
<applications>
-
<application>
-
<name>disk_io_iostat(通过iostat -m -x -d 30截取的参数)</name>
-
</application>
-
</applications>
-
<valuemap/>
-
<logtimefmt/>
-
</item_prototype>
-
<item_prototype>
-
<name>IO_svctm( 平均每次设备I/O操作的服务时间 (毫秒)) on $1</name>
-
<type>0</type>
-
<snmp_community/>
-
<multiplier>0</multiplier>
-
<snmp_oid/>
-
<key>io.svctm[{#DISK_NAME}]</key>
-
<delay>30</delay>
-
<history>90</history>
-
<trends>365</trends>
-
<status>0</status>
-
<value_type>0</value_type>
-
<allowed_hosts/>
-
<units>ms</units>
-
<delta>0</delta>
-
<snmpv3_contextname/>
-
<snmpv3_securityname/>
-
<snmpv3_securitylevel>0</snmpv3_securitylevel>
-
<snmpv3_authprotocol>0</snmpv3_authprotocol>
-
<snmpv3_authpassphrase/>
-
<snmpv3_privprotocol>0</snmpv3_privprotocol>
-
<snmpv3_privpassphrase/>
-
<formula>1</formula>
-
<delay_flex/>
-
<params/>
-
<ipmi_sensor/>
-
<data_type>0</data_type>
-
<authtype>0</authtype>
-
<username/>
-
<password/>
-
<publickey/>
-
<privatekey/>
-
<port/>
-
<description/>
-
<inventory_link>0</inventory_link>
-
<applications>
-
<application>
-
<name>disk_io_iostat(通过iostat -m -x -d 30截取的参数)</name>
-
</application>
-
</applications>
-
<valuemap/>
-
<logtimefmt/>
-
</item_prototype>
-
<item_prototype>
-
<name>IO_util(磁盘在一秒中有百分之多少的时间用于 I/O 操作) on $1</name>
-
<type>0</type>
-
<snmp_community/>
-
<multiplier>0</multiplier>
-
<snmp_oid/>
-
<key>io.util[{#DISK_NAME}]</key>
-
<delay>30</delay>
-
<history>90</history>
-
<trends>365</trends>
-
<status>0</status>
-
<value_type>0</value_type>
-
<allowed_hosts/>
-
<units>%</units>
-
<delta>0</delta>
-
<snmpv3_contextname/>
-
<snmpv3_securityname/>
-
<snmpv3_securitylevel>0</snmpv3_securitylevel>
-
<snmpv3_authprotocol>0</snmpv3_authprotocol>
-
<snmpv3_authpassphrase/>
-
<snmpv3_privprotocol>0</snmpv3_privprotocol>
-
<snmpv3_privpassphrase/>
-
<formula>1</formula>
-
<delay_flex/>
-
<params/>
-
<ipmi_sensor/>
-
<data_type>0</data_type>
-
<authtype>0</authtype>
-
<username/>
-
<password/>
-
<publickey/>
-
<privatekey/>
-
<port/>
-
<description/>
-
<inventory_link>0</inventory_link>
-
<applications>
-
<application>
-
<name>disk_io_iostat(通过iostat -m -x -d 30截取的参数)</name>
-
</application>
-
</applications>
-
<valuemap/>
-
<logtimefmt/>
-
</item_prototype>
-
<item_prototype>
-
<name>IO_wMBps(每秒写M字节数) on $1</name>
-
<type>0</type>
-
<snmp_community/>
-
<multiplier>0</multiplier>
-
<snmp_oid/>
-
<key>io.wMBps[{#DISK_NAME}]</key>
-
<delay>30</delay>
-
<history>90</history>
-
<trends>365</trends>
-
<status>0</status>
-
<value_type>0</value_type>
-
<allowed_hosts/>
-
<units>wMBps</units>
-
<delta>0</delta>
-
<snmpv3_contextname/>
-
<snmpv3_securityname/>
-
<snmpv3_securitylevel>0</snmpv3_securitylevel>
-
<snmpv3_authprotocol>0</snmpv3_authprotocol>
-
<snmpv3_authpassphrase/>
-
<snmpv3_privprotocol>0</snmpv3_privprotocol>
-
<snmpv3_privpassphrase/>
-
<formula>1</formula>
-
<delay_flex/>
-
<params/>
-
<ipmi_sensor/>
-
<data_type>0</data_type>
-
<authtype>0</authtype>
-
<username/>
-
<password/>
-
<publickey/>
-
<privatekey/>
-
<port/>
-
<description/>
-
<inventory_link>0</inventory_link>
-
<applications>
-
<application>
-
<name>disk_io_iostat(通过iostat -m -x -d 30截取的参数)</name>
-
</application>
-
</applications>
-
<valuemap/>
-
<logtimefmt/>
-
</item_prototype>
-
<item_prototype>
-
<name>IO_wps(每秒完成的写 I/O 设备次数) on $1</name>
-
<type>0</type>
-
<snmp_community/>
-
<multiplier>0</multiplier>
-
<snmp_oid/>
-
<key>io.wps[{#DISK_NAME}]</key>
-
<delay>30</delay>
-
<history>90</history>
-
<trends>365</trends>
-
<status>0</status>
-
<value_type>0</value_type>
-
<allowed_hosts/>
-
<units>wps</units>
-
<delta>0</delta>
-
<snmpv3_contextname/>
-
<snmpv3_securityname/>
-
<snmpv3_securitylevel>0</snmpv3_securitylevel>
-
<snmpv3_authprotocol>0</snmpv3_authprotocol>
-
<snmpv3_authpassphrase/>
-
<snmpv3_privprotocol>0</snmpv3_privprotocol>
-
<snmpv3_privpassphrase/>
-
<formula>1</formula>
-
<delay_flex/>
-
<params/>
-
<ipmi_sensor/>
-
<data_type>0</data_type>
-
<authtype>0</authtype>
-
<username/>
-
<password/>
-
<publickey/>
-
<privatekey/>
-
<port/>
-
<description/>
-
<inventory_link>0</inventory_link>
-
<applications>
-
<application>
-
<name>disk_io_iostat(通过iostat -m -x -d 30截取的参数)</name>
-
</application>
-
</applications>
-
<valuemap/>
-
<logtimefmt/>
-
</item_prototype>
-
</item_prototypes>
-
<trigger_prototypes/>
-
<graph_prototypes/>
-
<host_prototypes/>
-
</discovery_rule>
-
</discovery_rules>
-
<macros/>
-
<templates/>
-
<screens/>
-
</template>
-
</templates>
-
<graphs>
-
<graph>
-
<name>linux_disk_io_stat</name>
-
<width>900</width>
-
<height>200</height>
-
<yaxismin>0.0000</yaxismin>
-
<yaxismax>100.0000</yaxismax>
-
<show_work_period>1</show_work_period>
-
<show_triggers>1</show_triggers>
-
<type>0</type>
-
<show_legend>1</show_legend>
-
<show_3d>0</show_3d>
-
<percent_left>0.0000</percent_left>
-
<percent_right>0.0000</percent_right>
-
<ymin_type_1>0</ymin_type_1>
-
<ymax_type_1>0</ymax_type_1>
-
<ymin_item_1>0</ymin_item_1>
-
<ymax_item_1>0</ymax_item_1>
-
<graph_items>
-
<graph_item>
-
<sortorder>0</sortorder>
-
<drawtype>0</drawtype>
-
<color>00C800</color>
-
<yaxisside>0</yaxisside>
-
<calc_fnc>2</calc_fnc>
-
<type>0</type>
-
<item>
-
<host>disk_io_template</host>
-
<key>custom.vfs.dev.read.sectors[sda]</key>
-
</item>
-
</graph_item>
-
<graph_item>
-
<sortorder>1</sortorder>
-
<drawtype>0</drawtype>
-
<color>C80000</color>
-
<yaxisside>0</yaxisside>
-
<calc_fnc>2</calc_fnc>
-
<type>0</type>
-
<item>
-
<host>disk_io_template</host>
-
<key>custom.vfs.dev.read.ms[sda]</key>
-
</item>
-
</graph_item>
-
<graph_item>
-
<sortorder>2</sortorder>
-
<drawtype>0</drawtype>
-
<color>0000C8</color>
-
<yaxisside>0</yaxisside>
-
<calc_fnc>2</calc_fnc>
-
<type>0</type>
-
<item>
-
<host>disk_io_template</host>
-
<key>custom.vfs.dev.read.ops[sda]</key>
-
</item>
-
</graph_item>
-
<graph_item>
-
<sortorder>3</sortorder>
-
<drawtype>0</drawtype>
-
<color>C800C8</color>
-
<yaxisside>0</yaxisside>
-
<calc_fnc>2</calc_fnc>
-
<type>0</type>
-
<item>
-
<host>disk_io_template</host>
-
<key>custom.vfs.dev.write.sectors[sda]</key>
-
</item>
-
</graph_item>
-
<graph_item>
-
<sortorder>4</sortorder>
-
<drawtype>0</drawtype>
-
<color>00C8C8</color>
-
<yaxisside>0</yaxisside>
-
<calc_fnc>2</calc_fnc>
-
<type>0</type>
-
<item>
-
<host>disk_io_template</host>
-
<key>custom.vfs.dev.write.ms[sda]</key>
-
</item>
-
</graph_item>
-
<graph_item>
-
<sortorder>5</sortorder>
-
<drawtype>0</drawtype>
-
<color>C8C800</color>
-
<yaxisside>0</yaxisside>
-
<calc_fnc>2</calc_fnc>
-
<type>0</type>
-
<item>
-
<host>disk_io_template</host>
-
<key>custom.vfs.dev.write.ops[sda]</key>
-
</item>
-
</graph_item>
-
</graph_items>
-
</graph>
-
</graphs>
- </zabbix_export>