feat(alerts): alert when a known pool is not imported - #137
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #136.
What
EvaluatePoolsonly evaluated pools returned by the collector. When a pool fails to auto-import (e.g. after an unclean shutdown), it vanishes fromzpool listand no alert was raised, even though every dataset and container on it stays down.How
known_poolstable (migration v23): the alerter persists every pool it sees, with first/last seen timestamps.EASYZFS_POOL_MISSING_AFTERseconds (default 300) raises a criticalpool_missingalert. Fresh installs (empty table) never alert, so "never seen" is distinguished from "seen before and now missing".pool_missingin the push/email/channel i18n catalog (ES/EN) and in the notification preference types.GET /api/pools/missingendpoint; the dashboard shows a persistent critical banner listing the missing pools with a shortcut to Pools.Detection is strictly read-only: the app never attempts to import.
Test plan
internal/alerts/pool_missing_test.go(fresh install, missing pool alerts, grace window, re-import without re-alert, API contract). Full suite green.