diff --git a/.github/pint/pint.hcl b/.github/pint/pint.hcl index a48ad7e..a3130f8 100644 --- a/.github/pint/pint.hcl +++ b/.github/pint/pint.hcl @@ -8,7 +8,7 @@ prometheus "mastering-prometheus-public" { } ci { - include = [ "ch12/rules/test-rule.yaml" ] + include = [ ".github/pint/test-rule.yaml" ] baseBranch = "main" } diff --git a/.github/pint/test-rule.yaml b/.github/pint/test-rule.yaml new file mode 100644 index 0000000..29e53bc --- /dev/null +++ b/.github/pint/test-rule.yaml @@ -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 }}" + grafana: https://grafana.example.com/ssh-dashboard?var-instance={{ $labels.instance }} diff --git a/.github/workflows/pint.yaml b/.github/workflows/pint.yaml index b3ee1df..431ea5c 100644 --- a/.github/workflows/pint.yaml +++ b/.github/workflows/pint.yaml @@ -4,7 +4,7 @@ on: branches: - "main" paths: - - "ch12/rules/*.yaml" + - ".github/pint/test-rule.yaml" jobs: