forked from cloudflare/pint
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Run same rule validation as Prometheus
- Loading branch information
Showing
6 changed files
with
47 additions
and
23 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
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,21 @@ | ||
pint.error --no-color lint rules | ||
! stdout . | ||
cmp stderr stderr.txt | ||
|
||
-- stderr.txt -- | ||
level=error msg="Failed to unmarshal file content" error="yaml: unmarshal errors:\n line 2: field alert not found in type rulefmt.RuleGroup\n line 3: field expr not found in type rulefmt.RuleGroup\n line 4: field for not found in type rulefmt.RuleGroup\n line 5: field labels not found in type rulefmt.RuleGroup\n line 8: field annotations not found in type rulefmt.RuleGroup" lines=1-9 path=rules/strict.yml | ||
rules/strict.yml:2: field alert not found in type rulefmt.RuleGroup (yaml/parse) | ||
- alert: Conntrack_Table_Almost_Full | ||
|
||
level=info msg="Problems found" Fatal=1 | ||
level=fatal msg="Fatal error" error="problems found" | ||
-- rules/strict.yml -- | ||
groups: | ||
- alert: Conntrack_Table_Almost_Full | ||
expr: ((node_nf_conntrack_entries / node_nf_conntrack_entries_limit) * 100) > 75 | ||
for: 5m | ||
labels: | ||
component: conntrack | ||
priority: "3" | ||
annotations: | ||
summary: Conntrack table is at {{ $value|humanize }}% |
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
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