-
Notifications
You must be signed in to change notification settings - Fork 22
Description
Hello,
If the purpose is to fire the trigger when there is a problem with the RAID, you can't use the "clean" or "active" state : An array can be in degraded mode (have a faulty disk) and in "clean" or "active" state at the same time.
If the goal is the fire the trigger when a disk fail, you should use something like :
{#MD_DEVICE} RAID status degraded
{Template MD RAID:mdraid[{#MD_DEVICE},e,"State"].regexp("(degraded|failed)")}=1&{Template MD RAID:mdraid[{#MD_DEVICE},e,"State"].regexp("(resyncing|recovering)")}=0
I don't think that there is a "failed" state but I put it just in case...
I would also add another trigger with "information" severity to know when an array is rebuilding :
{#MD_DEVICE} RAID status building
{Template MD RAID:mdraid[{#MD_DEVICE},e,"State"].regexp("(resyncing|recovering)")}=1
Cheers!