Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

Preserve reviewed monitoring repairs with current upstream thresholds

pulse-triage[bot]2e1768e45c5f
diff --cc internal/alerts/unified_eval.go
index b108596bcf,33e1330462..a6345fb1a5
--- a/internal/alerts/unified_eval.go
+++ b/internal/alerts/unified_eval.go
@@@ -307,61 -314,11 +316,61 @@@ func (m *Manager) evaluateUnifiedMetric
}
}
+// An omitted/rejected metric is unknown, not a pause in its sustained-for
+// clock. Build candidates stays pure; dispatch owns interruption for metrics
+// this resource supports but cannot currently observe.
+func (m *Manager) interruptUnobservedUnifiedMetrics(input *UnifiedResourceInput, candidates []unifiedMetricCandidate, separatelyEvaluated []string) {
+ if _, ok := unifiedMetricResourceType(input.Type); !ok {
+ return
+ }
+ metrics := [...]string{"cpu", "memory", "disk", "temperature", "diskRead", "diskWrite", "networkIn", "networkOut", "usage"}
+ m.mu.Lock()
+ intentChanged := false
+ for _, metric := range metrics {
+ separateOwner := false
+ for _, separateMetric := range separatelyEvaluated {
+ if metric == separateMetric {
+ separateOwner = true
+ break
+ }
+ }
+ if separateOwner {
+ continue
+ }
+ switch metric {
+ case "diskRead", "diskWrite", "networkIn", "networkOut":
+ if !supportsUnifiedIOMetrics(input.Type) {
+ continue
+ }
+ case "usage":
+ if !unifiedStorageUsageResourceType(input.Type) {
+ continue
+ }
+ }
+ observed := false
+ for _, candidate := range candidates {
+ if candidate.Spec.MetricThreshold.Metric == metric {
+ observed = true
+ break
+ }
+ }
+ if !observed {
+ if m.interruptMetricRunNoLock(input.ID, canonicalMetricSpecID(input.ID, metric), canonicalMetricStateID(input.ID, metric)) {
+ intentChanged = true
+ }
+ }
+ }
+ m.mu.Unlock()
+ if intentChanged {
+ m.saveActiveAlertsAsync("unified metric observation gap")
+ }
+}
+
+ // metricOptionsWithTags records a resource's tags on its metric alerts. With
+ // no tags it drops any an open alert still carries: config-save reevaluation
+ // reads pulse-relaxed back from them, and a removed tag left behind judged
+ // the alert by thresholds the evaluator no longer applies.
func metricOptionsWithTags(opts *metricOptions, tags []string) *metricOptions {
- if len(tags) == 0 {
- return opts
- }
-
merged := metricOptions{}
if opts != nil {
merged = *opts