Most RAID controllers report state changes as generic strings. Here's how to turn that into an alert that actually tells you what to do.
A degraded array is still serving data on redundancy alone; a failed one may not be. Treat DEGRADED as an urgent-but-not-critical alert and FAILED as critical, rather than lumping every non-OPTIMAL state together.
A rebuild that stalls partway through is a bigger risk than one that's progressing normally, since the array runs without redundancy the whole time. Alert if rebuild percentage hasn't moved in longer than expected for the array's size.
A RAID member marked failed usually has a SMART history that showed reallocated sectors or pending sectors climbing beforehand. Reviewing that trend after a failure is often the fastest way to catch the next one earlier.