Skip to content

Skvare/com.skvare.checkalert

Repository files navigation

com.skvare.checkalert

CiviCRM's System Status Check page lets you snooze an alert until it re-occurs, but there's no way to say "never show me this one again" — especially for alerts raised by hook_civicrm_check in other extensions. This extension adds that: an admin picks which named checks to permanently suppress, and they're removed from every consumer of check results (the System Status dashboard, the System.check API, and the daily admin status notice).

This is an extension for CiviCRM, licensed under AGPL-3.0.

How it works

  • hook_civicrm_container registers Civi\Checkalert\CheckSuppressor::onCheck() as a listener on the hook_civicrm_check event at priority -PHP_INT_MAX — the lowest possible priority, so it always runs last, after core's own checks and every other extension's hook_civicrm_check() implementation (which run at the default priority of -100) have already added their messages.
  • By the time it runs, the messages array is complete, so it can safely strip out any message whose name is in the checkalert_suppressed_checks setting before the results are returned.
  • The setting is managed from Administer > System Settings > Check Alert Settings, which lists every check currently reported by the System.check API (core + all extensions) with a checkbox to suppress it.
  • Optionally, a comma-separated list of email domains (checkalert_visible_email_domains) can be configured so that a logged-in contact whose primary email matches one of those domains still sees suppressed alerts — useful for letting hosting/support staff keep seeing everything while suppressing noise for client admins.

Getting Started

Go to Administer > System Settings > Check Alert Settings (civicrm/admin/checkalert), tick the checks you want removed from System Status results, optionally enter email domains that should always see suppressed alerts, and save.

Known Issues

  • Only checks that have fired at least once (or were previously suppressed) appear in the settings list, since CiviCRM has no static registry of every possible check — this mirrors how the core System Status page itself works.

Releases

Packages

Contributors

Languages