--- smeserver-zabbix-agent-0.1/root/etc/e-smith/templates/etc/sudoers/00zabbixAgentAlias.userparam_megaraid 2009-03-27 13:21:29.000000000 +0100 +++ smeserver-zabbix-agent-0.1/root/etc/e-smith/templates/etc/sudoers/00zabbixAgentAlias 2009-03-27 13:46:26.000000000 +0100 @@ -1,4 +1,11 @@ -Cmnd_Alias ZABBIX_AGENT_ROOT = /usr/bin/mysqladmin status +{ +my $runasroot = '/usr/bin/mysqladmin status'; +if ( -x '/opt/MegaRAID/MegaCli/MegaCli' ){ + $runasroot .= ', /opt/MegaRAID/MegaCli/MegaCli -ldinfo -Lall -Aall'; +} +$runasroot .= "\n"; +$OUT .= 'Cmnd_Alias ZABBIX_AGENT_ROOT = '.$runasroot +} Cmnd_Alias ZABBIX_AGENT_MYSQL = /usr/bin/du -s /var/lib/mysql Cmnd_Alias ZABBIX_AGENT_SMELOG = /var/lib/zabbix/bin/logtail.pl /var/log/qpsmtpd/current /var/lib/zabbix/tmp/* Cmnd_Alias ZABBIX_AGENT_QMAIL = /var/lib/zabbix/bin/logtail.pl /var/log/qmail/current /var/lib/zabbix/tmp/* --- smeserver-zabbix-agent-0.1/root/etc/e-smith/templates/etc/zabbix/zabbix_agentd.conf/90UserParameters_megaRaid.userparam_megaraid 2009-03-27 13:22:07.000000000 +0100 +++ smeserver-zabbix-agent-0.1/root/etc/e-smith/templates/etc/zabbix/zabbix_agentd.conf/90UserParameters_megaRaid 2009-03-27 13:47:29.000000000 +0100 @@ -0,0 +1,28 @@ + +{ + +# As this check requires the MegaCli utility, first check if it's present: +if ( -x '/opt/MegaRAID/MegaCli/MegaCli' ){ + $OUT .=<<"HERE"; + +# Report status of every Raid Array using the MegaRaid controler (Requires the MegaCli utility) +# This controler is used for example on perc5/6(i) Raid card + +# Description: MegaRaid Status +# Type: Agent or Agent (active) +# Key: raid.mega.status +# Type of Information: Character +# Show Value: As is + +# The value reported is like: +# State: Optimal +# State: Degraded +# + +# Tips: You can add a simple trigger on this check like: +# \{ hostname:raid.mega.status.str( Degraded ) \}=1 +UserParameter=raid.mega.status,/usr/bin/sudo /opt/MegaRAID/MegaCli/MegaCli -ldinfo -Lall -Aall | grep "^State:" + +HERE +} +}