Skip to content

Latest commit

 

History

History
67 lines (52 loc) · 1.83 KB

File metadata and controls

67 lines (52 loc) · 1.83 KB

Notification: Prometheus Pushgateway

Pushes backup metrics to a Prometheus Pushgateway after each successful backup.

Module: backups.notifications.prometheus

Example

{
  "id": "prometheus-notify",
  "type": "prometheus",
  "url": "http://pushgateway.monitoring.svc:9091",
  "credentials": {
    "username": "pushgw",
    "password": "YOUR_PASSWORD"
  }
}

With API key authentication:

{
  "id": "prometheus-notify",
  "type": "prometheus",
  "url": "http://pushgateway.monitoring.svc:9091",
  "api_key": "YOUR_API_KEY"
}

Without authentication:

{
  "id": "prometheus-notify",
  "type": "prometheus",
  "url": "http://pushgateway.monitoring.svc:9091"
}

Parameters

Key Required Purpose
id Yes Unique identifier for this notification.
url Yes URL of the Prometheus Pushgateway.
api_key No API key sent as X-API-Key header. Takes precedence over credentials.
credentials.username No Basic auth username for the Pushgateway.
credentials.password No Basic auth password for the Pushgateway.

Metrics pushed

Metric Type Description
backup_size Summary Size of the backup file in bytes.
backup_dumptime Summary Time taken to dump and compress/encrypt the backup (seconds).
backup_uploadtime Summary Time taken to upload the backup (seconds).
backup_retained_copies Gauge Number of retained backup copies on the destination.
backup_timestamp Gauge Unix timestamp when the backup completed.

Metrics are pushed with job=<source_id>, allowing per-source alerting rules.

Events

  • Success: Pushes all metrics to the gateway.
  • Failure: Not reported (consider pairing with a flag file for failure detection).