系统只有sda硬盘,所以只需要监控sda就可以了,有需要自己修改模版及添加项目
1
2
3
4
5
6
7
8
9
10
|
[root@123 ~]
# vim /usr/local/zabbix/etc/zabbix_agentd.conf
UserParameter=mysql.status[*],
/home/sh/checkmysqlperformance
.sh $1 $2
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}'
|
附件为xml模版.
附件:http://down.51cto.com/data/2365878
本文转自谢无赖51CTO博客,原文链接:http://blog.51cto.com/xieping/1671626 ,如需转载请自行联系原作者