Code Monkey home page Code Monkey logo

zabbix-hp's Introduction

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

zabbix-hp's People

Contributors

pfoo avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

zabbix-hp's Issues

I believe the HDD temp addition breaks the perl script on failed disk...

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

Posisble to add HDD temps ?

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 ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.