cacti 版本0.8.7e
下载snmpdiskio-0.9.6.zip
监控端
1、将下载的snmpdiskio-0.9.6.zip上传到cacit服务器上,
cp partition.xml /www/nosite/cacti/resource/snmp_queries/
2、在cacti服务器的web界面下cacti-->console--->Import/Export--->Import Templates
"cacti_data_query_snmp_disk_statistics.xml
cacti_graph_template_disk_io_bytessec.xml"
导入这2个模板
3、测试
snmpwalk -v 2c -c cacti client_ip .1.3.6.1.4.1.2021.58
4、cacti devices 选中客户端,下拉Associated data queries添加SNMP Disk statistics
Create Graphs for this Host 选择要监控的分区 比如sda 最后创建创建
客户端
1、more /etc/snmp/snmpd.conf
ubuntu
extend .1.3.6.1.4.1.2021.54 hdNum /usr/local/bin/snmpdiskio hdNum
extend .1.3.6.1.4.1.2021.55 hdIndex /usr/local/bin/snmpdiskio hdIndex
extend .1.3.6.1.4.1.2021.56 hdDescr /usr/local/bin/snmpdiskio hdDescr
extend .1.3.6.1.4.1.2021.57 hdInBlocks /usr/local/bin/snmpdiskio hdInBlocks
extend .1.3.6.1.4.1.2021.58 hdOutBlocks /usr/local/bin/snmpdiskio hdOutBlocks
centos
exec .1.3.6.1.4.1.2021.54 hdNum /bin/sh /usr/local/bin/snmpdiskio hdNum
exec .1.3.6.1.4.1.2021.55 hdIndex /bin/sh /usr/local/bin/snmpdiskio hdIndex
exec .1.3.6.1.4.1.2021.56 hdDescr /bin/sh /usr/local/bin/snmpdiskio hdDescr
exec .1.3.6.1.4.1.2021.57 hdInBlocks /bin/sh /usr/local/bin/snmpdiskio hdInBlocks
exec .1.3.6.1.4.1.2021.58 hdOutBlocks /bin/sh /usr/local/bin/snmpdiskio hdOutBlocks
2、mv snmpdiskio /usr/local/bin/ && chmod 755 /usr/local/bin/snmpdiskio
3、service snmpd restart
927 2012-12-28 17:39:53 /usr/local/bin/snmpdiskio hdNum
928 2012-12-28 17:40:07 /usr/local/bin/snmpdiskio hdIndex
929 2012-12-28 17:40:14 /usr/local/bin/snmpdiskio hdDescr
930 2012-12-28 17:40:24 /usr/local/bin/snmpdiskio hdInBlocks
931 2012-12-28 17:40:42 /usr/local/bin/snmpdiskio hdOutBlocks
参考:http://loveyan.blog.51cto.com/829079/745561
http://tipstricks.itmatrix.eu/?p=721