-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: make the health minions metrics configurable
- Loading branch information
Loïc Yavercovski
committed
Apr 14, 2023
1 parent
f21c294
commit df3e0f3
Showing
4 changed files
with
66 additions
and
6 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package metrics | ||
|
||
type MetricsConfig struct { | ||
HealthMinions bool | ||
HealthFunctionsFilters []string | ||
HealthStatesFilters []string | ||
} |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
groups: | ||
- name: saltstack | ||
rules: | ||
- alert: SaltExporterLastHighstateSuccess | ||
expr: sum by(minion) (salt_state_health{function="state.highstate", state="highstate"} == 0) | ||
for: 60m | ||
labels: | ||
severity: critical | ||
minion: "{{ $labels.minion }}" | ||
annotations: | ||
summary: "Salt Last Successful Highstate Failed (minion {{ $labels.minion }})" | ||
description: "Salt Last Successful Highstate failed since > 60m" | ||
- alert: SaltExporterLastHighstateSuccessInfo | ||
expr: sum by(minion) (salt_state_health{function="state.highstate", state="highstate"} == 0) | ||
for: 10m | ||
labels: | ||
severity: info | ||
minion: "{{ $labels.minion }}" | ||
annotations: | ||
summary: "Salt Last Successful Highstate Failed (minion {{ $labels.minion }})" |