pfoo / zabbix-hp Goto Github PK
View Code? Open in Web Editor NEWTool providing HP server health value to a zabbix server using zabbix-sender
License: GNU General Public License v2.0
Tool providing HP server health value to a zabbix server using zabbix-sender
License: GNU General Public License v2.0
original scripts : https://github.com/jbfavre/python-zabbix/tree/master/scripts original templates : https://github.com/jbfavre/python-zabbix/tree/master/templates script were not modified a lot templates however has been added a few triggers and items rules Require : - hpasmcli (provided by hp-health) - hpssacli (provided by hpssacli) Perls scripts must be run trough zabbix-sender using a crontab (see hp_hard.cron) regexp must be added to http://yourzabbixserver/zabbix/adm.regexps.php (administration > general > regular expression) or discovery rules wont work (=99% of the templates) There is however no way to export those regexp ... so you have to add them by hand Example for : HP Hardware Fans for discovery regexp=^(fan)[0-9]+$ [Result is TRUE] [case sensitive=no] HP Hardware Power for discovery regexp=^(power)[0-9]+$ [Result is TRUE] [case sensitive=no] HP Hardware Raid controller for discovery regexp=^(controller)[0-9]+$ [Result is TRUE] [case sensitive=no] HP Hardware Raid logical drive for discovery regexp=^(logicaldrive)[0-9]+$ [Result is TRUE] [case sensitive=no] HP Hardware Raid physical drive for discovery regexp=^(physicaldrive)[0-9]I:[0-9]:[0-9]$ [Result is TRUE] [case sensitive=no] HP Hardware Temperature for discovery regexp=^(temp)[0-9]+$ [Result is TRUE] [case sensitive=no] You can activate templates individually on your hosts, or just activate "BBC Template - HP Hardware" which is linked to the other ones You might need to update the regexp for fan and temp to work properly in : - hp_hard_fan.pl line 37 - hp_hard_temp.pl line 32
Hi.
Although the hp_hard_raid.pl script works fine when all disks are in the array.
i.e
# /srv/zabbix/hp_hard_raid.pl
- hp.hardware.raid.controller[0,controller_status] OK
- hp.hardware.raid.controller[0,controller_temperature] 41
- hp.hardware.raid.controller[0,cache_status] OK
- hp.hardware.raid.controller[0,cache_module_temperature] 31
- hp.hardware.raid.controller[0,cache_read_ratio] 10
- hp.hardware.raid.controller[0,cache_write_ratio] 90
- hp.hardware.raid.controller[0,total_cache_memory_available] 1.8
- hp.hardware.raid.controller[0,battery_capacitor_status] OK
- hp.hardware.raid.controller[0,capacitor_temperature] 0
- hp.hardware.raid.logicaldrive[0:1,status] OK
- hp.hardware.raid.physicaldrive[1I:1:1,status] OK
- hp.hardware.raid.physicaldrive[1I:1:2,status] OK
- hp.hardware.raid.physicaldrive[1I:1:3,status] OK
- hp.hardware.raid.physicaldrive[1I:1:4,status] OK
- hp.hardware.raid.physicaldrive[2I:1:5,status] OK
- hp.hardware.raid.physicaldrive[2I:1:6,status] OK
- hp.hardware.raid.physicaldrive[1I:1:1,current_temperature] 35
- hp.hardware.raid.physicaldrive[1I:1:1,maximum_temperature] 48
- hp.hardware.raid.physicaldrive[1I:1:2,current_temperature] 37
- hp.hardware.raid.physicaldrive[1I:1:2,maximum_temperature] 50
- hp.hardware.raid.physicaldrive[1I:1:3,current_temperature] 30
- hp.hardware.raid.physicaldrive[1I:1:3,maximum_temperature] 46
- hp.hardware.raid.physicaldrive[1I:1:4,current_temperature] 33
- hp.hardware.raid.physicaldrive[1I:1:4,maximum_temperature] 49
- hp.hardware.raid.physicaldrive[2I:1:5,current_temperature] 29
- hp.hardware.raid.physicaldrive[2I:1:5,maximum_temperature] 46
- hp.hardware.raid.physicaldrive[2I:1:6,current_temperature] 32
- hp.hardware.raid.physicaldrive[2I:1:6,maximum_temperature] 47
It breaks when you have a failed disk...
Use of uninitialized value in concatenation (.) or string at /srv/zabbix/hp_hard_raid.pl line 214.
This means that if a disk fails you do not get notified...
i.e
# /srv/zabbix/hp_hard_raid.pl
- hp.hardware.raid.controller[0,controller_status] OK
- hp.hardware.raid.controller[0,controller_temperature] 41
- hp.hardware.raid.controller[0,cache_status] OK
- hp.hardware.raid.controller[0,cache_module_temperature] 33
- hp.hardware.raid.controller[0,cache_read_ratio] 10
- hp.hardware.raid.controller[0,cache_write_ratio] 90
- hp.hardware.raid.controller[0,total_cache_memory_available] 1.8
- hp.hardware.raid.controller[0,battery_capacitor_status] OK
- hp.hardware.raid.controller[0,capacitor_temperature] 0
- hp.hardware.raid.logicaldrive[0:1,status] Interim
- hp.hardware.raid.physicaldrive[1I:1:1,status] Failed
- hp.hardware.raid.physicaldrive[1I:1:2,status] OK
- hp.hardware.raid.physicaldrive[1I:1:3,status] OK
- hp.hardware.raid.physicaldrive[1I:1:4,status] OK
- hp.hardware.raid.physicaldrive[2I:1:5,status] OK
- hp.hardware.raid.physicaldrive[2I:1:6,status] OK
Use of uninitialized value in concatenation (.) or string at /srv/zabbix/hp_hard_raid.pl line 214.
- hp.hardware.raid.physicaldrive[1I:1:1,current_temperature]
- hp.hardware.raid.physicaldrive[1I:1:1,maximum_temperature] 48
- hp.hardware.raid.physicaldrive[1I:1:2,current_temperature] 33
- hp.hardware.raid.physicaldrive[1I:1:2,maximum_temperature] 49
- hp.hardware.raid.physicaldrive[1I:1:3,current_temperature] 31
- hp.hardware.raid.physicaldrive[1I:1:3,maximum_temperature] 45
- hp.hardware.raid.physicaldrive[1I:1:4,current_temperature] 33
- hp.hardware.raid.physicaldrive[1I:1:4,maximum_temperature] 47
- hp.hardware.raid.physicaldrive[2I:1:5,current_temperature] 31
- hp.hardware.raid.physicaldrive[2I:1:5,maximum_temperature] 45
- hp.hardware.raid.physicaldrive[2I:1:6,current_temperature] 32
If I comment out line 214 - it runs ok (but i have no HDD temp. ) and does then notify of a failed disk.
How can I fix this ?
Regards
I have modified (locally) the 3.2 templates to work with Zabbix 3.0.x
One thing that is missing is the HDD temp reading, is there an easy way of adding it ?
i.e if you do
# hpssacli ctrl slot=0 pd all show detail
you see the output on the physical disk temps
i.e
physicaldrive 1I:1:1
Port: 1I
Box: 1
Bay: 1
Status: OK
Drive Type: Data Drive
Interface Type: SAS
Size: 4000.7 GB
Drive exposed to OS: False
Native Block Size: 512
Rotational Speed: 7200
Firmware Revision: HPDA
Serial Number: S1Z1CKK10000K5512XPH
Model: HP MB4000FCWDK
Current Temperature (C): 37
Maximum Temperature (C): 47
PHY Count: 2
PHY Transfer Rate: 6.0Gbps, Unknown
Drive Authentication Status: OK
Carrier Application Version: 11
Carrier Bootloader Version: 6
Sanitize Erase Supported: False
physicaldrive 1I:1:2
Port: 1I
Box: 1
Bay: 2
Status: OK
Drive Type: Data Drive
Interface Type: SAS
Size: 4000.7 GB
Drive exposed to OS: False
Native Block Size: 512
Rotational Speed: 7200
Firmware Revision: HPDA
Serial Number: S1Z1CQ1D0000K551408W
Model: HP MB4000FCWDK
Current Temperature (C): 37
Maximum Temperature (C): 45
PHY Count: 2
PHY Transfer Rate: 6.0Gbps, Unknown
Drive Authentication Status: OK
Carrier Application Version: 11
Carrier Bootloader Version: 6
Sanitize Erase Supported: False
So I could use
# hpssacli ctrl slot=0 pd all show detail |grep -i "current"
But my issue is the discovery part. My perl skills are not great.
Is there a way I can add the feature ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.