Skip to content

RAID state in trigger #1

Description

@stettler

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!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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