# you can disable an alarm notification by setting the 'to' line to: silent

# Adapters (controllers)

 template: megacli_adapter_health_state
       on: megacli.adapter_health_state
    class: Errors
     type: System
component: RAID
   lookup: average -1m unaligned percentage of optimal
    units: %
    every: 10s
     crit: $this < 100
    delay: down 5m multiplier 2 max 10m
  summary: MegaCLI adapter ${label:adapter_number} health
     info: MegaCLI adapter ${label:adapter_number} is in the degraded state
       to: sysadmin

 template: megacli_phys_drive_media_errors
       on: megacli.phys_drive_media_errors
    class: Errors
     type: System
component: RAID
   lookup: sum -10s
    units: media errors
    every: 10s
     warn: $this > 0
    delay: up 1m down 5m multiplier 2 max 10m
  summary: MegaCLI PD adapter ${label:adapter_number} slot ${label:slot_number} media errors
     info: MegaCLI physical drive adapter ${label:adapter_number} slot ${label:slot_number} media errors
       to: sysadmin

# Physical Drives

 template: megacli_phys_drive_predictive_failures
       on: megacli.phys_drive_predictive_failures
    class: Errors
     type: System
component: RAID
   lookup: sum -10s
    units: failures
    every: 10s
     warn: $this > 0
    delay: up 1m down 5m multiplier 2 max 10m
  summary: MegaCLI PD adapter ${label:adapter_number} slot ${label:slot_number} predictive failures
     info: MegaCLI physical drive (adapter ${label:adapter_number} slot ${label:slot_number}) predictive failures
       to: sysadmin

# Backup Battery Unit

 template: megacli_bbu_charge
       on: megacli.bbu_charge
    class: Workload
     type: System
component: RAID
   lookup: average -10s
    units: percent
    every: 10s
     warn: $this <= (($status >= $WARNING)  ? (85) : (80))
     crit: $this <= (($status == $CRITICAL)  ? (50) : (40))
  summary: MegaCLI BBU charge
     info: MegaCLI Backup Battery Unit (adapter ${label:adapter_number}) average charge over the last minute
       to: sysadmin

 template: megacli_bbu_recharge_cycles
       on: megacli.bbu_recharge_cycles
    class: Workload
     type: System
component: RAID
   lookup: average -10s
    units: cycles
    every: 10s
     warn: $this >= 100
     crit: $this >= 500
  summary: MegaCLI BBU recharge cycles
     info: MegaCLI Backup Battery Unit (adapter ${label:adapter_number}) recharge cycles
       to: sysadmin
