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.
- Loading branch information
Showing
28 changed files
with
661 additions
and
197 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,43 @@ | ||
pint.error --no-color lint rules | ||
! stdout . | ||
cmp stderr stderr.txt | ||
|
||
-- stderr.txt -- | ||
level=info msg="Loading configuration file" path=.pint.hcl | ||
level=info msg="File parsed" path=rules/0001.yml rules=3 | ||
rules/0001.yml:4-6: alert_for annotation is required (alerts/annotation) | ||
- alert: Instance Is Down 2 | ||
expr: up == 0 | ||
for: 5m | ||
|
||
rules/0001.yml:12: alert_for annotation value must match "^{{ $for }}$" (alerts/annotation) | ||
alert_for: 4m | ||
|
||
level=info msg="Problems found" Bug=2 | ||
level=fatal msg="Fatal error" error="problems found" | ||
-- rules/0001.yml -- | ||
- alert: Instance Is Down 1 | ||
expr: up == 0 | ||
|
||
- alert: Instance Is Down 2 | ||
expr: up == 0 | ||
for: 5m | ||
|
||
- alert: Instance Is Down 3 | ||
expr: up == 0 | ||
for: 5m | ||
annotations: | ||
alert_for: 4m | ||
|
||
-- .pint.hcl -- | ||
rule { | ||
match { | ||
for = "> 0" | ||
} | ||
|
||
annotation "alert_for" { | ||
required = true | ||
value = "{{ $for }}" | ||
severity = "bug" | ||
} | ||
} |
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,23 @@ | ||
pint.error --no-color lint rules | ||
! stdout . | ||
cmp stderr stderr.txt | ||
|
||
-- stderr.txt -- | ||
level=info msg="Loading configuration file" path=.pint.hcl | ||
level=fatal msg="Fatal error" error="failed to load config file \".pint.hcl\": template: regexp:1:126: executing \"regexp\" at <nil>: nil is not a command" | ||
-- rules/0001.yml -- | ||
- alert: Instance Is Down 1 | ||
expr: up == 0 | ||
|
||
-- .pint.hcl -- | ||
rule { | ||
match { | ||
for = "> 0" | ||
} | ||
|
||
annotation "alert_for" { | ||
required = true | ||
value = "{{ nil }}" | ||
severity = "bug" | ||
} | ||
} |
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
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
Oops, something went wrong.