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

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

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


Revision 1.1 - (show annotations) (download)
Wed Mar 17 09:10:41 2010 UTC (14 years, 7 months ago) by vip-ire
Branch: MAIN
CVS Tags: smeserver-zabbix-agent-0_1-48_el4_sme, smeserver-zabbix-agent-0_1-43_el4_sme, smeserver-zabbix-agent-0_1-41_el4_sme, smeserver-zabbix-agent-0_1-47_el4_sme, smeserver-zabbix-agent-0_1-46_el4_sme, smeserver-zabbix-agent-0_1-50_el4_sme, smeserver-zabbix-agent-0_1-45_el4_sme, smeserver-zabbix-agent-0_1-51_el4_sme, smeserver-zabbix-agent-0_1-44_el4_sme, smeserver-zabbix-agent-0_1-52_el4_sme, smeserver-zabbix-agent-0_1-42_el4_sme, smeserver-zabbix-agent-0_1-49_el4_sme, HEAD
* Wed Mar 17 2010 Daniel B. <daniel@firewall-services.com> 0.1-41
- read megaraid options from the DB (number of spares, number of
  error to ignore)

1 --- smeserver-zabbix-agent-0.1/root/etc/e-smith/templates/etc/zabbix/zabbix_agentd.conf/90UserParameters_megaRaid.megaraid_options_from_db 2010-03-17 09:57:11.000000000 +0100
2 +++ smeserver-zabbix-agent-0.1/root/etc/e-smith/templates/etc/zabbix/zabbix_agentd.conf/90UserParameters_megaRaid 2010-03-17 10:06:04.000000000 +0100
3 @@ -1,6 +1,16 @@
4
5 {
6
7 +my $options = '';
8 +my $spares = ${'zabbix-agent'}{'MegaRaidSpares'} || '';
9 +$options .= "-s $spares " if ($spares =~ /\d+/);
10 +my $media_error = ${'zabbix-agent'}{'MegaRaidMediaError'} || '';
11 +$options .= "-m $media_error " if ($media_error =~ /\d+/);
12 +my $other_error = ${'zabbix-agent'}{'MegaRaidOtherError'} || '';
13 +$options .= "-o $other_error " if ($other_error =~ /\d+/);
14 +my $predictive_error = ${'zabbix-agent'}{'MegaRaidPredictiveError'} || '';
15 +$options .= "-p $predictive_error " if ($predictive_error =~ /\d+/);
16 +
17 # As this check requires the MegaCli utility, first check if it's present:
18 if ( -x '/opt/MegaRAID/MegaCli/MegaCli' ){
19 $OUT .=<<"HERE";
20 @@ -20,7 +30,7 @@
21
22 # Tips: You can add a simple trigger on this check like:
23 # \{ hostname:raid.mega.status.str( OK ) \}=0
24 -UserParameter=raid.mega.status,/usr/bin/sudo /var/lib/zabbix/bin/megaraid-parser.pl
25 +UserParameter=raid.mega.status,/usr/bin/sudo /var/lib/zabbix/bin/megaraid-parser.pl $options
26
27 HERE
28 }

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