Skip to content

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

@morgancoxuk

Description

@morgancoxuk

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions