/[smecontribs]/rpms/smeserver-zabbix-agent/contribs7/smeserver-zabbix-agent-0.1-userparam_megaraid.patch
ViewVC logotype

Contents of /rpms/smeserver-zabbix-agent/contribs7/smeserver-zabbix-agent-0.1-userparam_megaraid.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download)
Fri Mar 27 12:56:37 2009 UTC (15 years, 8 months ago) by vip-ire
Branch: MAIN
CVS Tags: smeserver-zabbix-agent-0_1-34_el4_sme, smeserver-zabbix-agent-0_1-35_el4_sme, smeserver-zabbix-agent-0_1-46_el4_sme, smeserver-zabbix-agent-0_1-42_el4_sme, smeserver-zabbix-agent-0_1-41_el4_sme, smeserver-zabbix-agent-0_1-49_el4_sme, smeserver-zabbix-agent-0_1-27_el4_sme, smeserver-zabbix-agent-0_1-38_el4_sme, smeserver-zabbix-agent-0_1-47_el4_sme, smeserver-zabbix-agent-0_1-30_el4_sme, smeserver-zabbix-agent-0_1-50_el4_sme, smeserver-zabbix-agent-0_1-32_el4_sme, smeserver-zabbix-agent-0_1-39_el4_sme, smeserver-zabbix-agent-0_1-45_el4_sme, smeserver-zabbix-agent-0_1-51_el4_sme, smeserver-zabbix-agent-0_1-29_el4_sme, smeserver-zabbix-agent-0_1-44_el4_sme, smeserver-zabbix-agent-0_1-52_el4_sme, smeserver-zabbix-agent-0_1-28_el4_sme, smeserver-zabbix-agent-0_1-26_el4_sme, smeserver-zabbix-agent-0_1-48_el4_sme, smeserver-zabbix-agent-0_1-36_el4_sme, smeserver-zabbix-agent-0_1-37_el4_sme, smeserver-zabbix-agent-0_1-33_el4_sme, smeserver-zabbix-agent-0_1-43_el4_sme, smeserver-zabbix-agent-0_1-31_el4_sme, smeserver-zabbix-agent-0_1-40_el4_sme, HEAD
Add monitoring of MegaRaid based raid array

1 --- smeserver-zabbix-agent-0.1/root/etc/e-smith/templates/etc/sudoers/00zabbixAgentAlias.userparam_megaraid 2009-03-27 13:21:29.000000000 +0100
2 +++ smeserver-zabbix-agent-0.1/root/etc/e-smith/templates/etc/sudoers/00zabbixAgentAlias 2009-03-27 13:46:26.000000000 +0100
3 @@ -1,4 +1,11 @@
4 -Cmnd_Alias ZABBIX_AGENT_ROOT = /usr/bin/mysqladmin status
5 +{
6 +my $runasroot = '/usr/bin/mysqladmin status';
7 +if ( -x '/opt/MegaRAID/MegaCli/MegaCli' ){
8 + $runasroot .= ', /opt/MegaRAID/MegaCli/MegaCli -ldinfo -Lall -Aall';
9 +}
10 +$runasroot .= "\n";
11 +$OUT .= 'Cmnd_Alias ZABBIX_AGENT_ROOT = '.$runasroot
12 +}
13 Cmnd_Alias ZABBIX_AGENT_MYSQL = /usr/bin/du -s /var/lib/mysql
14 Cmnd_Alias ZABBIX_AGENT_SMELOG = /var/lib/zabbix/bin/logtail.pl /var/log/qpsmtpd/current /var/lib/zabbix/tmp/*
15 Cmnd_Alias ZABBIX_AGENT_QMAIL = /var/lib/zabbix/bin/logtail.pl /var/log/qmail/current /var/lib/zabbix/tmp/*
16 --- 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
17 +++ 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
18 @@ -0,0 +1,28 @@
19 +
20 +{
21 +
22 +# As this check requires the MegaCli utility, first check if it's present:
23 +if ( -x '/opt/MegaRAID/MegaCli/MegaCli' ){
24 + $OUT .=<<"HERE";
25 +
26 +# Report status of every Raid Array using the MegaRaid controler (Requires the MegaCli utility)
27 +# This controler is used for example on perc5/6(i) Raid card
28 +
29 +# Description: MegaRaid Status
30 +# Type: Agent or Agent (active)
31 +# Key: raid.mega.status
32 +# Type of Information: Character
33 +# Show Value: As is
34 +
35 +# The value reported is like:
36 +# State: Optimal
37 +# State: Degraded
38 +#
39 +
40 +# Tips: You can add a simple trigger on this check like:
41 +# \{ hostname:raid.mega.status.str( Degraded ) \}=1
42 +UserParameter=raid.mega.status,/usr/bin/sudo /opt/MegaRAID/MegaCli/MegaCli -ldinfo -Lall -Aall | grep "^State:"
43 +
44 +HERE
45 +}
46 +}

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed