- name: Postgres
  rules:
    - alert: PgDown
      expr: >
        pg_up{job="postgres"} == 0
      for: 10m
      labels:
        severity: critical
      annotations:
        summary: "Postgres on {{ $labels.instance }} is down"
    - alert: PgScrapeError
      expr: >
        pg_exporter_last_scrape_error{job="postgres"} > 0
      for: 10m
      labels:
        severity: warning
      annotations:
        summary: "Could not scrape postgres on {{ $labels.instance }}"
