diff --git a/createlinks b/createlinks index 3b1448c..1f02030 100644 --- a/createlinks +++ b/createlinks @@ -7,7 +7,7 @@ foreach my $conf (qw!zabbix_agentd.conf zabbix_agentd.conf.d/asterisk.conf zabbix_agentd.conf.d/deprecated_cpunum.conf zabbix_agentd.conf.d/deprecated_memory.conf zabbix_agentd.conf.d/deprecated_netstat.conf zabbix_agentd.conf.d/deprecated_swap.conf zabbix_agentd.conf.d/extip.conf zabbix_agentd.conf.d/mail.conf zabbix_agentd.conf.d/mysql.conf - zabbix_agentd.conf.d/phpki_certs.conf zabbix_agentd.conf.d/samba.conf!){ + zabbix_agentd.conf.d/phpki_certs.conf zabbix_agentd.conf.d/samba.conf zabbix_agentd.conf.d/block_devices.conf!){ templates2events("/etc/zabbix/$conf", qw(zabbix-agent-update bootstrap-console-save)); } templates2events("/etc/sudoers", "zabbix-agent-update"); diff --git a/root/etc/e-smith/templates/etc/zabbix/zabbix_agentd.conf.d/block_devices.conf/10All b/root/etc/e-smith/templates/etc/zabbix/zabbix_agentd.conf.d/block_devices.conf/10All new file mode 100644 index 0000000..634166c --- /dev/null +++ b/root/etc/e-smith/templates/etc/zabbix/zabbix_agentd.conf.d/block_devices.conf/10All @@ -0,0 +1,13 @@ +{ + $OUT = ''; + qx(zabbix_agentd -t vfs.dev.discovery -c /dev/null | grep -q ZBX_NOTSUPPORTED); + if ($? != 0){ + $OUT .= '# vfs.dev.discovery is natively supported, not UserParameter needed'; + } else{ + $OUT .=<<'_EOF'; +# Discover block devices +UserParameter=vfs.dev.discovery,/var/lib/zabbix/bin/disco_block_devices +_EOF + } +} +