I have a UserParameter that works fine in so long as I don't use a '-' in the argument portion.
So this works: disk.avgqu[sda]
But this doesn't: disk.avgqu[dm-0]
This is the relevant snippet from zabbix_agentd.conf file:
UserParameter=disk.avgrq[*], grep -w $1 /home/zabbix/disk-stats.txt|tail -n1|awk '/[0-9]*\.[0-9]*/{ print $$8 }'
and just incase you want to know what the /home/zabbix/disk-stats.txt file looks like:
So this works: disk.avgqu[sda]
But this doesn't: disk.avgqu[dm-0]
This is the relevant snippet from zabbix_agentd.conf file:
UserParameter=disk.avgrq[*], grep -w $1 /home/zabbix/disk-stats.txt|tail -n1|awk '/[0-9]*\.[0-9]*/{ print $$8 }'
and just incase you want to know what the /home/zabbix/disk-stats.txt file looks like:
Code:
Linux 2.6.9-78.0.8.ELsmp (cc1lnx1) 01/25/10 Time: 16:38:01 Device: rrqm/s wrqm/s r/s w/s rsec/s wsec/s rkB/s wkB/s avgrq-sz avgqu-sz await svctm %util sda 0.03 1.31 0.74 0.68 27.37 15.87 13.69 7.94 30.48 0.00 2.08 1.05 0.15 sda1 0.00 0.00 0.00 0.00 0.12 0.00 0.06 0.00 125.88 0.00 2.61 2.51 0.00 sda2 0.03 1.31 0.74 0.68 27.25 15.87 13.62 7.94 30.41 0.00 2.08 1.05 0.15 dm-0 0.00 0.00 0.08 1.17 2.19 9.37 1.09 4.69 9.25 0.00 0.67 0.25 0.03 dm-1 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 8.00 0.00 2.91 0.25 0.00 dm-2 0.00 0.00 0.02 0.01 1.92 0.10 0.96 0.05 55.10 0.00 6.39 1.33 0.00 dm-3 0.00 0.00 0.00 0.06 0.00 0.48 0.00 0.24 8.00 0.01 221.81 0.05 0.00 dm-4 0.00 0.00 0.54 0.13 14.03 1.04 7.01 0.52 22.64 0.00 2.37 1.23 0.08 dm-5 0.00 0.00 0.05 0.17 6.78 1.37 3.39 0.68 37.46 0.00 3.01 0.55 0.01 dm-6 0.00 0.00 0.09 0.44 2.33 3.50 1.17 1.75 11.15 0.00 2.12 0.44 0.02 Device: rBlk_nor/s wBlk_nor/s rBlk_dir/s wBlk_dir/s rBlk_svr/s wBlk_svr/s Time: 16:39:01 Device: rrqm/s wrqm/s r/s w/s rsec/s wsec/s rkB/s wkB/s avgrq-sz avgqu-sz await svctm %util sda 0.00 1.63 0.00 0.95 0.00 20.67 0.00 10.33 21.75 0.00 0.89 0.37 0.04 sda1 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 sda2 0.00 1.63 0.00 0.95 0.00 20.67 0.00 10.33 21.75 0.00 0.89 0.37 0.04 dm-0 0.00 0.00 0.00 1.83 0.00 14.67 0.00 7.33 8.00 0.00 0.80 0.11 0.02 dm-1 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 dm-2 0.00 0.00 0.00 0.22 0.00 1.73 0.00 0.87 8.00 0.00 1.08 0.38 0.01 dm-3 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 dm-4 0.00 0.00 0.00 0.50 0.00 4.00 0.00 2.00 8.00 0.00 0.97 0.07 0.00 dm-5 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 dm-6 0.00 0.00 0.00 0.03 0.00 0.27 0.00 0.13 8.00 0.00 3.00 1.50 0.01 Device: rBlk_nor/s wBlk_nor/s rBlk_dir/s wBlk_dir/s rBlk_svr/s wBlk_svr/s
Comment