|
| 1 | +--- |
| 2 | +groups: |
| 3 | + - name: pbs.rules |
| 4 | + rules: |
| 5 | + - alert: PBS - Down |
| 6 | + expr: pbs_up == 0 |
| 7 | + for: 10m |
| 8 | + labels: |
| 9 | + severity: critical |
| 10 | + annotations: |
| 11 | + summary: "PBS Offline" |
| 12 | + description: "PBS job is not returning a healthy state." |
| 13 | + |
| 14 | + - alert: PBS - Verification Not Successful |
| 15 | + expr: pbs_snapshot_vm_last_verify == 0 |
| 16 | + for: 10m |
| 17 | + labels: |
| 18 | + severity: critical |
| 19 | + annotations: |
| 20 | + summary: "PBS snapshot for {{ $labels.vm_name }} is not verified successfully" |
| 21 | + description: >- |
| 22 | + The latest snapshot for {{ $labels.vm_name }} on |
| 23 | + {{ $labels.node_name }} is not verified successfully. |
| 24 | +
|
| 25 | + - alert: PBS - Local Backup Stale |
| 26 | + expr: >- |
| 27 | + (time() - pbs_snapshot_vm_last_timestamp > 172800) |
| 28 | + and on (site_slug, namespace) |
| 29 | + label_replace( |
| 30 | + count by (site_slug) (pbs_snapshot_vm_last_timestamp), |
| 31 | + "namespace", "$1", "site_slug", "(.+)" |
| 32 | + ) |
| 33 | + for: 10m |
| 34 | + labels: |
| 35 | + severity: critical |
| 36 | + annotations: |
| 37 | + summary: "PBS backup for {{ $labels.vm_name }} is older than two days" |
| 38 | + description: >- |
| 39 | + The latest local snapshot for {{ $labels.vm_name }} on |
| 40 | + {{ $labels.node_name }} is older than two days. |
| 41 | +
|
| 42 | + - alert: PBS - Sync Backup Stale |
| 43 | + expr: >- |
| 44 | + (time() - pbs_snapshot_vm_last_timestamp > 172800) |
| 45 | + unless on (site_slug, namespace) |
| 46 | + label_replace( |
| 47 | + count by (site_slug) (pbs_snapshot_vm_last_timestamp), |
| 48 | + "namespace", "$1", "site_slug", "(.+)" |
| 49 | + ) |
| 50 | + for: 10m |
| 51 | + labels: |
| 52 | + severity: critical |
| 53 | + annotations: |
| 54 | + summary: "PBS sync for {{ $labels.vm_name }} is older than two days" |
| 55 | + description: >- |
| 56 | + The latest remote snapshot for {{ $labels.vm_name }} on |
| 57 | + {{ $labels.node_name }} is older than two days. |
| 58 | +
|
| 59 | + - alert: PBS - Sync Missing |
| 60 | + expr: >- |
| 61 | + count by (site_slug, node_name, instance) (pbs_snapshot_vm_last_timestamp) |
| 62 | + unless on (site_slug, node_name, instance) |
| 63 | + count by (site_slug, node_name, instance) ( |
| 64 | + pbs_snapshot_vm_last_timestamp |
| 65 | + unless on (site_slug, namespace) |
| 66 | + label_replace( |
| 67 | + count by (site_slug) (pbs_snapshot_vm_last_timestamp), |
| 68 | + "namespace", "$1", "site_slug", "(.+)" |
| 69 | + ) |
| 70 | + ) |
| 71 | + for: 10m |
| 72 | + labels: |
| 73 | + severity: critical |
| 74 | + annotations: |
| 75 | + summary: "PBS has no remote snapshots" |
| 76 | + description: >- |
| 77 | + PBS {{ $labels.node_name }} has local snapshots but no snapshots in |
| 78 | + a remote namespace. |
0 commit comments