/[smecontribs]/rpms/smeserver-zabbix-agent/contribs9/smeserver-zabbix-agent-0.1-userparam_smart.patch
ViewVC logotype

Contents of /rpms/smeserver-zabbix-agent/contribs9/smeserver-zabbix-agent-0.1-userparam_smart.patch

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


Revision 1.1 - (show annotations) (download)
Tue Feb 9 23:18:27 2016 UTC (8 years, 9 months ago) by stephdl
Branch: MAIN
CVS Tags: smeserver-zabbix-agent-0_1-53_el6_sme, smeserver-zabbix-agent--, HEAD
* Wed Feb 10 stephane de Labrusse <stephdl@de-labrusse.fr> - 0.1-53.sme
- New rpm for sme9

1 --- smeserver-zabbix-agent-0.1/root/etc/e-smith/templates/etc/sudoers/00zabbixAgentAlias.userparam_smart 2009-08-28 05:28:21.000000000 +0200
2 +++ smeserver-zabbix-agent-0.1/root/etc/e-smith/templates/etc/sudoers/00zabbixAgentAlias 2009-08-28 05:28:55.000000000 +0200
3 @@ -1,5 +1,5 @@
4 {
5 -my $runasroot = '/usr/bin/mysqladmin status, /sbin/e-smith/db yum_updates show, /var/lib/zabbix/bin/sensors *';
6 +my $runasroot = '/usr/bin/mysqladmin status, /sbin/e-smith/db yum_updates show, /var/lib/zabbix/bin/sensors *, /usr/sbin/smartctl -A /dev/*';
7 if ( -x '/opt/MegaRAID/MegaCli/MegaCli' ){
8 $runasroot .= ', /opt/MegaRAID/MegaCli/MegaCli *';
9 }
10 --- smeserver-zabbix-agent-0.1/root/etc/e-smith/templates/etc/zabbix/zabbix_agentd.conf/90UserParameters_smart.userparam_smart 2009-08-28 05:29:14.000000000 +0200
11 +++ smeserver-zabbix-agent-0.1/root/etc/e-smith/templates/etc/zabbix/zabbix_agentd.conf/90UserParameters_smart 2009-08-28 05:31:05.000000000 +0200
12 @@ -0,0 +1,39 @@
13 +# Smart Monitoring
14 +
15 +# Description: Smart Value <key>
16 +# Key can be one of: Raw_Read_Error_Rate, Spin_Up_Time, Start_Stop_Count
17 +# Reallocated_Sector_Ct, Seek_Error_Rate, Power_On_Hours, Spin_Retry_Count,
18 +# Power_Cycle_Count, Temperature_Celsius, Hardware_ECC_Recovered,
19 +# Current_Pending_Sector, Offline_Uncorrectable, UDMA_CRC_Error_Count,
20 +# Multi_Zone_Error_Rate, TA_Increase_Count
21 +
22 +# Type: Agent or Agent (active)
23 +# Key: system.smart.hdX[<key>] (for example system.smart.hd1[Reallocated_Sector_Ct])
24 +# Type of information: Numeric (integer 64bit)
25 +# Units: (none)
26 +# Use multiplier: No
27 +# Update interval: 120 (for example)
28 +# Store Value: As is
29 +# Show Value: As is
30 +
31 +# For Seek_Error_Rate, Raw_Read_Error_Rate, Hardware_ECC_Recovered you can store value as Delta
32 +# in order to graph the error rate in a readable format
33 +
34 +# For these UserParameter to work, you need to configure the drives you want to monitor
35 +# in the DB:
36 +# db configuration setprop zabbix-agent SmartDrives /dev/sda,/dev/sdb,/dev/sdc,/dev/sdd
37 +# signal-event zabbix-agent-update
38 +
39 +{
40 +
41 +my @hd = split( /[,;]/,( ${'zabbix-agent'}{'SmartDrives'} || '' ));
42 +
43 +my $cnt = 1;
44 +foreach my $drive (@hd){
45 + if ( -e $drive){
46 + $OUT .= "UserParameter=system.smartd.hd" . $cnt. "[*],/usr/bin/sudo /usr/sbin/smartctl -A $drive| grep \$1| tail -1| cut -c 88-|cut -f1 -d' '";
47 + $cnt++;
48 + }
49 +}
50 +}
51 +

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