Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion config/observability-rules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,13 @@ rules:
severity: page
query_language: promql
stream_name: gha_fleet_host_oom_kills_total
expression: max by (host_name) (increase(gha_fleet_host_oom_kills_total[5m]))
# PromQL increase extrapolates a counter to both range boundaries. A single
# exact kernel event therefore appeared in the notification as
# 1.0526315789473684. Preserve increase's reset handling, but report the
# physical event count rather than its sampling extrapolation. `round` is
# supported by the deployed OpenObserve engine and leaves the > 0 detector
# unchanged for integer counter increments.
expression: round(max by (host_name) (increase(gha_fleet_host_oom_kills_total[5m])))
operator: ">"
threshold: 0
evaluation_seconds: 30
Expand Down
1 change: 1 addition & 0 deletions internal/observabilityrules/rules_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ func TestRepositoryRulesUseCurrentMetricSemantics(t *testing.T) {
"audit_suppression_burst": `signal_class="audit_suppressed"`,
"kernel_workqueue_hog": `signal_class="kernel_workqueue_hog"`,
"host_compliance_observer_missing": "gha_fleet_host_compliance_observer_up",
"host_oom_detected": "round(max by (host_name) (increase(gha_fleet_host_oom_kills_total[5m])))",
"host_package_inventory_stale": "gha_fleet_host_package_inventory_age_seconds",
"host_reboot_required": "gha_fleet_host_reboot_required",
"host_standard_updates_available": "gha_fleet_host_standard_updates_available",
Expand Down