Skip to content
Open
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
2 changes: 1 addition & 1 deletion .github/pint/pint.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ prometheus "mastering-prometheus-public" {
}

ci {
include = [ "ch12/rules/test-rule.yaml" ]
include = [ ".github/pint/test-rule.yaml" ]
baseBranch = "main"
}

Expand Down
16 changes: 16 additions & 0 deletions .github/pint/test-rule.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
groups:
- name: chapter12
rules:
# pint disable promql/series(probe_success)
- alert: SSHDown
expr: >
max_over_time(
probe_success{job="blackbox_ssh"}[5m]
) != 1
for: 5m
labels:
severity: warning
team: sre
annotations:
description: "Cannot SSH to {{ $labels.instance }}"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛑 alerts/annotation: description annotation value Cannot SSH to {{ $labels.instance }} must match ^[A-Z].+\{\{.*\}\}.*\.$.

grafana: https://grafana.example.com/ssh-dashboard?var-instance={{ $labels.instance }}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛑 alerts/annotation: summary annotation is required.

2 changes: 1 addition & 1 deletion .github/workflows/pint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
branches:
- "main"
paths:
- "ch12/rules/*.yaml"
- ".github/pint/test-rule.yaml"


jobs:
Expand Down