smeserver-zabbix-agent/root/etc/e-smith/templates/etc/zabbix/zabbix_agentd.conf/90UserParameters_diskIO
2012-06-14 12:16:52 +02:00

43 lines
1.2 KiB
Plaintext

# Disk I/O Monitoring
# Description: Read operations on hdX
# X can be from 1 to 8
# you'll have to create a custom template if
# you want to support more than 8 drives
# You can also monitor raid devices (/dev/md1 for example)
# Type: Agent or Agent (active)
# Key: vfs.dev.read.hdX vfs.dev.write.hdX
# Type of information: Numeric (Float or integer 64bit)
# Units: bytes/sec
# Use multiplier: 512
# Update interval: 60 (for example)
# Store Value: Delta (speed/sec)
# Show Value: As is
# For these UserParameter to work, you need to configure the drives you want to monitor
# in the DB:
# db configuration setprop zabbix-agent HardDrives /dev/sda,/dev/sdb,/dev/sdc,/dev/sdd
# signal-event zabbix-agent-update
{
my @hd = split( /[,;]/,( ${'zabbix-agent'}{'HardDrives'} || '' ));
my $cnt = 1;
foreach my $drive (@hd){
if ( -e $drive){
$drive =~ s|/dev/||;
$OUT .= "Alias=vfs.dev.read.hd" . $cnt . ":vfs.dev.read[$drive,sectors]\n";
$OUT .= "Alias=vfs.dev.write.hd" . $cnt . ":vfs.dev.write[$drive,sectors]\n";
$cnt++;
}
}
for (;$cnt < 9; $cnt++){
$OUT .= "UserParameter=vfs.dev.read.hd" . $cnt . ",echo '0'\n";
$OUT .= "UserParameter=vfs.dev.write.hd" . $cnt . ",echo '0'\n";
}
}