ronivay / zabbix-dell-omsa

Dell OMSA monitoring with Zabbix
6 stars 3 forks source link

(Dedicated/Hot) spares marked as failed #2

Closed BenArgyle closed 3 years ago

BenArgyle commented 3 years ago

This is an excellent template and we're very happy with it, thank you. However we've noticed that the "Dedicated"/"Global" hot spares we have, which "omreport storage pdisk vdisk=X controller=Y" reports as (unnecessary lines removed)

Status                          : Ok
State                           : Ready
Power Status                    : Spun Up
Failure Predicted               : No
Hot Spare                       : Dedicated

... are being marked as failed by the template/in Zabbix. Compare and contrast with a disk in the same RAID set, which isn't a spare:

Status                          : Ok
State                           : Online
Power Status                    : Spun Up
Failure Predicted               : No
Hot Spare                       : No

... and is pefectly happy. Can you modify the template to allow for "Dedicated" and "Global" hot spares which are still "Ok" but are "Ready" rather than "Online", please?

Note that we have this template working perfectly with OMSA 9.5.0, Zabbix 4.0.29 client and Zabbix 5.2.4 server.

Thanks again for writing it!

BenArgyle commented 3 years ago

As a suggestion. We've made the following change here:

{Template OMSA:omsa.pdstatus[{#PDISK},{#CONTROLLER},status].iregexp(Online,#1)}=0 to {Template OMSA:omsa.pdstatus[{#PDISK},{#CONTROLLER},status].iregexp(Online|Ready,#1)}=0

but would appreciate you adding the functionality (perhaps done a better way, with more identification of hot spares).

ronivay commented 3 years ago

Hi,

Thanks and sorry for late reply. I tested couple different approaches for getting more information about the spares, but since there isn't easy way in zabbix to discover items under same application (say physical disks controller X) with different names like 0:1:0 (spare) and 0:1:1 this became quite cluttered as all disks would've had information if they're spares or not. Best option for the time being would've been adding non-spare disks under their own application and spares under their own, but since they're all physical disks and fall under the current physical disk application, this would've been also little bit confusing.

Your fix seems totally okay for me and something i would've originally used myself but didn't take spares into account as i didn't have any on my test bench. Commited that fix to template.