Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Veeam Backup Exporter

A Prometheus exporter for Veeam Backup & Replication that exposes job run results via the Veeam REST API.

Metrics

Metric Type Description
veeam_up Gauge Whether the Veeam REST API is reachable. 1 = reachable, 0 = not.
veeam_job_last_run_result{job_name} Gauge Result of the most recent run for each job. See values below.
veeam_scrape_duration_seconds Gauge Time taken to collect metrics from the Veeam REST API.

veeam_job_last_run_result values

Value Meaning
1 Success
0 Failed
2 Warning
-1 Running / Unknown

Requirements

  • Veeam Backup & Replication with REST API enabled (v11 or later)
  • A Veeam user account with at least read-only access to jobs
  • Docker (recommended) or Go 1.23+

Configuration

All configuration is passed via environment variables:

Variable Required Description
VEEAM_HOST Yes Hostname or IP of the Veeam Backup & Replication server
VEEAM_PORT Yes REST API port (default is 9419)
VEEAM_USERNAME Yes Veeam user with read access
VEEAM_PASSWORD Yes Password for the above user

Flags

Flag Default Description
--web.listen-address :9772 Address on which to expose metrics
--web.telemetry-path /metrics Path under which to expose metrics

Running with Docker Compose

Create a .env file in the same directory as docker-compose.yml (keep this out of version control):

VEEAM_HOST=192.168.1.100
VEEAM_PORT=9419
VEEAM_USERNAME=administrator
VEEAM_PASSWORD=yourpassword

Then start the exporter:

docker compose up -d

Metrics will be available at http://localhost:9772/metrics.

Running with Docker

docker build -t veeam-exporter .

docker run -d \
  -p 9772:9772 \
  -e VEEAM_HOST=192.168.1.100 \
  -e VEEAM_PORT=9419 \
  -e VEEAM_USERNAME=administrator \
  -e VEEAM_PASSWORD=yourpassword \
  veeam-exporter

Running from source

go build -o veeam-exporter .

VEEAM_HOST=192.168.1.100 \
VEEAM_PORT=9419 \
VEEAM_USERNAME=administrator \
VEEAM_PASSWORD=yourpassword \
./veeam-exporter --web.listen-address=:9772

Prometheus scrape config

Add this to your prometheus.yml:

scrape_configs:
  - job_name: veeam
    static_configs:
      - targets: ['localhost:9772']

Grafana dashboard

A pre-built dashboard is included at grafana-dashboard.json. Import it via Dashboards → Import in Grafana. It requires a Prometheus datasource named Prometheus.

The dashboard includes:

  • API connectivity status (veeam_up)
  • Last scrape duration
  • Total jobs monitored
  • Failed job count with alerting color
  • Per-job result bar gauge
  • Per-job result table (sortable)
  • Job result history over time (timeseries)

TLS notes

The exporter connects to the Veeam REST API over HTTPS. If your Veeam server uses a self-signed certificate, you will need to either:

  • Add the certificate to the container's trust store by mounting it and updating ca-certificates, or
  • Use a valid certificate on your Veeam server (recommended for production)

Alerting example

A useful alerting rule to fire when any job fails:

groups:
  - name: veeam
    rules:
      - alert: VeeamJobFailed
        expr: veeam_job_last_run_result == 0
        for: 0m
        labels:
          severity: critical
        annotations:
          summary: "Veeam job failed: {{ $labels.job_name }}"

      - alert: VeeamAPIDown
        expr: veeam_up == 0
        for: 2m
        labels:
          severity: critical
        annotations:
          summary: "Veeam exporter cannot reach the Veeam REST API"

Project structure

veeambackup-exporter/
├── main.go                 # Exporter source
├── go.mod
├── go.sum
├── Dockerfile
├── docker-compose.yml
├── grafana-dashboard.json
└── README.md

License

MIT

About

Prometheus Exporter For Veeam Backup Jobs

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages