mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-11-29 09:10:58 +01:00
Align Mail Gateway Help with stale-readings presentation
Document how Proxmox -> Mail Gateway handles stale PMG polls while an independent availability check still passes (#5176): keeping retained mail, quarantine and queue counts visible, labelling the row Readings stale, excluding the gateway from Healthy into Degraded while preserving Offline and open critical alerts, showing Readings stale. Showing the last poll. in the detail panel without attributing quiet polls to PMG, and clearing the cue live on the next fresh poll. Mirror the update in frontend-modern/public/docs/MAIL_GATEWAY.md and bind it to the frontend table and drawer contract in scripts/tests/test_pmg_docs.py. Contract-Neutral: Documents already-landed Mail Gateway stale-reading UI presentation (#5176) and adds static doc-contract tests without changing runtime code, polling, alerts, metrics, or API contracts. Change-source: pulse-maintainer
This commit is contained in:
@@ -106,6 +106,37 @@ queue data can still raise the highest configured severity, but cannot clear
|
||||
or downgrade an existing alert; quarantine recovery requires both categories.
|
||||
These collector safeguards do not make every empty display a verified zero.
|
||||
|
||||
### When readings are stale
|
||||
|
||||
An independent availability check (such as an HTTPS or port check) can keep
|
||||
passing while the PMG poll stops or lags. A passing availability check does not
|
||||
make mail, queue or quarantine counts current.
|
||||
|
||||
When the PMG poll is stale, **Proxmox → Mail Gateway** keeps the retained mail,
|
||||
quarantine and node queue counts visible so you do not lose the last known
|
||||
figures, labels the row **Readings stale**, and takes the gateway out of
|
||||
**Healthy** into **Degraded** in the status filter:
|
||||
|
||||
- **Offline and critical alerts stay visible:** An explicitly **Offline**
|
||||
gateway remains under **Offline**, and open critical alerts keep their alert
|
||||
indicator alongside **Readings stale**.
|
||||
- **Row details separate quiet polls from PMG faults:** Expanding the row shows
|
||||
**Readings stale. Showing the last poll.** together with any actual
|
||||
PMG-reported degradation reason (such as unhealthy cluster nodes, queue
|
||||
backlog or non-healthy connection health), without attributing a quiet poll to
|
||||
PMG itself.
|
||||
- **Recovery updates live:** When a fresh PMG poll arrives, the view updates
|
||||
the counts, clears **Readings stale** and restores **Healthy** (when no
|
||||
offline state or open alert remains) without reloading or restarting Pulse.
|
||||
|
||||
Older published releases may not display **Readings stale** when another source
|
||||
keeps the gateway online. On those builds, compare the reading time and PMG's
|
||||
own view directly. While PMG readings are stale, check whether the connection is
|
||||
paused in **Settings → Infrastructure**, check
|
||||
[poll-progress signals](ALERTING.md#warn-when-expected-polls-stop-succeeding)
|
||||
and the [bounded Pulse log readers](TROUBLESHOOTING.md#inspect-notification-logs),
|
||||
and rely on PMG's own queue view until fresh polls resume.
|
||||
|
||||
## Alerts
|
||||
|
||||
Open **Alerts → Thresholds → Proxmox** and find **Mail Gateway Thresholds**.
|
||||
@@ -132,6 +163,7 @@ or permissions:
|
||||
| Certificate validation error | The certificate name, expiry and trusted chain for that endpoint. Do not disable verification or change to HTTP. |
|
||||
| 401/403 | The configured account and its read permissions for the specific failed request, privately. Do not grant administrator access as a diagnostic shortcut. |
|
||||
| Gateway is present but statistics are missing | Clear view filters, check whether the connection is paused, and compare the particular dataset and time window with PMG. A successful test or version read does not establish dataset access. |
|
||||
| **Readings stale** appears while the gateway responds | An independent availability check can pass while the PMG poll is quiet. Follow [When readings are stale](#when-readings-are-stale) and check PMG's own queue view without restarting or re-adding the connection. |
|
||||
| Cluster nodes or node queues are missing | Compare the gateway's existing cluster inventory and each affected node's native queue view. One reachable node does not prove every node was collected. |
|
||||
|
||||
### Response decoding is not a network verdict
|
||||
|
||||
@@ -106,6 +106,37 @@ queue data can still raise the highest configured severity, but cannot clear
|
||||
or downgrade an existing alert; quarantine recovery requires both categories.
|
||||
These collector safeguards do not make every empty display a verified zero.
|
||||
|
||||
### When readings are stale
|
||||
|
||||
An independent availability check (such as an HTTPS or port check) can keep
|
||||
passing while the PMG poll stops or lags. A passing availability check does not
|
||||
make mail, queue or quarantine counts current.
|
||||
|
||||
When the PMG poll is stale, **Proxmox → Mail Gateway** keeps the retained mail,
|
||||
quarantine and node queue counts visible so you do not lose the last known
|
||||
figures, labels the row **Readings stale**, and takes the gateway out of
|
||||
**Healthy** into **Degraded** in the status filter:
|
||||
|
||||
- **Offline and critical alerts stay visible:** An explicitly **Offline**
|
||||
gateway remains under **Offline**, and open critical alerts keep their alert
|
||||
indicator alongside **Readings stale**.
|
||||
- **Row details separate quiet polls from PMG faults:** Expanding the row shows
|
||||
**Readings stale. Showing the last poll.** together with any actual
|
||||
PMG-reported degradation reason (such as unhealthy cluster nodes, queue
|
||||
backlog or non-healthy connection health), without attributing a quiet poll to
|
||||
PMG itself.
|
||||
- **Recovery updates live:** When a fresh PMG poll arrives, the view updates
|
||||
the counts, clears **Readings stale** and restores **Healthy** (when no
|
||||
offline state or open alert remains) without reloading or restarting Pulse.
|
||||
|
||||
Older published releases may not display **Readings stale** when another source
|
||||
keeps the gateway online. On those builds, compare the reading time and PMG's
|
||||
own view directly. While PMG readings are stale, check whether the connection is
|
||||
paused in **Settings → Infrastructure**, check
|
||||
[poll-progress signals](ALERTING.md#warn-when-expected-polls-stop-succeeding)
|
||||
and the [bounded Pulse log readers](TROUBLESHOOTING.md#inspect-notification-logs),
|
||||
and rely on PMG's own queue view until fresh polls resume.
|
||||
|
||||
## Alerts
|
||||
|
||||
Open **Alerts → Thresholds → Proxmox** and find **Mail Gateway Thresholds**.
|
||||
@@ -132,6 +163,7 @@ or permissions:
|
||||
| Certificate validation error | The certificate name, expiry and trusted chain for that endpoint. Do not disable verification or change to HTTP. |
|
||||
| 401/403 | The configured account and its read permissions for the specific failed request, privately. Do not grant administrator access as a diagnostic shortcut. |
|
||||
| Gateway is present but statistics are missing | Clear view filters, check whether the connection is paused, and compare the particular dataset and time window with PMG. A successful test or version read does not establish dataset access. |
|
||||
| **Readings stale** appears while the gateway responds | An independent availability check can pass while the PMG poll is quiet. Follow [When readings are stale](#when-readings-are-stale) and check PMG's own queue view without restarting or re-adding the connection. |
|
||||
| Cluster nodes or node queues are missing | Compare the gateway's existing cluster inventory and each affected node's native queue view. One reachable node does not prove every node was collected. |
|
||||
|
||||
### Response decoding is not a network verdict
|
||||
|
||||
@@ -75,6 +75,34 @@ class PMGDocsTest(unittest.TestCase):
|
||||
self.assertIn("compare the same window in PMG", self.guide)
|
||||
self.assertIn("Expand the intended gateway's row", self.guide)
|
||||
|
||||
def test_stale_readings_guidance_matches_table_and_drawer_contract(self):
|
||||
table = frontend("features/proxmox/ProxmoxMailGatewayTable.tsx")
|
||||
drawer = frontend("features/proxmox/ProxmoxMailGatewayDrawer.tsx")
|
||||
self.assertIn("resource.sourceStatus?.pmg?.status === 'stale'", drawer)
|
||||
self.assertIn("quietWarning", drawer)
|
||||
self.assertIn("const STALE_READINGS = 'Readings stale';", table)
|
||||
self.assertIn(". Showing the last poll. ", table)
|
||||
self.assertIn("hasStaleMailGatewayReadings(resource)", table)
|
||||
section = self.guide.split("When readings are stale", 1)[1].split("Alerts", 1)[0]
|
||||
for phrase in (
|
||||
"independent availability check",
|
||||
"does not make mail, queue or quarantine counts current",
|
||||
"keeps the retained mail, quarantine and node queue counts visible",
|
||||
"labels the row Readings stale",
|
||||
"out of Healthy into Degraded",
|
||||
"Offline gateway remains under Offline",
|
||||
"open critical alerts keep their alert indicator alongside Readings stale",
|
||||
"Readings stale. Showing the last poll.",
|
||||
"without attributing a quiet poll to PMG itself",
|
||||
"clears Readings stale and restores Healthy",
|
||||
"without reloading or restarting Pulse",
|
||||
"Older published releases may not display Readings stale",
|
||||
):
|
||||
self.assertIn(phrase, section)
|
||||
self.assertIn("(ALERTING.md#warn-when-expected-polls-stop-succeeding)", self.text)
|
||||
self.assertIn("(#when-readings-are-stale)", self.text)
|
||||
self.assertNotRegex(section, r"```|\b(?:curl|wget)\b|upgrade to|fixed in|beta")
|
||||
|
||||
def test_documented_thresholds_exist_and_keep_their_units(self):
|
||||
config = (ROOT / "internal/alerts/config/types.go").read_text()
|
||||
fields = config.split("type PMGThresholdConfig struct {", 1)[1].split("\n}", 1)[0]
|
||||
|
||||
Reference in New Issue
Block a user