Skip to main content

Proxmox VE exporter for the Prometheus monitoring system.

Project description

Prometheus Proxmox VE Exporter

Build Status Package Version

This is an exporter that exposes information gathered from Proxmox VE node for use by the Prometheus monitoring system.

Installation

Note: Python 2 is not supported anymore as of version 2.0.0. Instead use Python 3.6 or better.

Using pip:

python3 -m pip install prometheus-pve-exporter

Using docker:

docker pull prompve/prometheus-pve-exporter

Example: Display usage message:

docker run -it --rm prompve/prometheus-pve-exporter --help

Example: Run the image with a mounted configuration file and published port:

docker run --name prometheus-pve-exporter -d -p 127.0.0.1:9221:9221 -v /path/to/pve.yml:/etc/pve.yml prompve/prometheus-pve-exporter

Prometheus PVE Exporter will now be reachable at http://localhost:9090/.

Usage

usage: pve_exporter [-h] [config] [port] [address]

positional arguments:
  config      Path to configuration file (pve.yml)
  port        Port on which the exporter is listening (9221)
  address     Address to which the exporter will bind

optional arguments:
  -h, --help  show this help message and exit

Use :: for the address argument in order to bind to both IPv6 and IPv4 sockets on dual stacked machines.

Visit http://localhost:9221/pve?target=1.2.3.4 where 1.2.3.4 is the IP of the Proxmox VE node to get metrics from. Specify the module request parameter, to choose which module to use from the config file.

The target request parameter defaults to localhost. Hence if pve_exporter is deployed directly on the proxmox host, target can be omitted.

See the wiki for more examples and docs.

Authentication

Example pve.yml for password authentication:

default:
    user: prometheus@pve
    password: sEcr3T!

Example pve.yml for token authentication:

default:
    user: prometheus@pve
    token_name: "..."
    token_value: "..."

The configuration is passed directly into proxmoxer.ProxmoxAPI().

Note: When operating PVE with self-signed certificates, then it is necessary to either import the certificate into the local trust store (see this SE answer for Debian/Ubuntu) or add verify_ssl: false to the config dict as a sibling to the credentials. Note that PVE supports Let’s Encrypt out ouf the box. In many cases setting up trusted certificates is the better option than operating with self-signed certs.

Proxmox VE Configuration

For security reasons it is essential to add a user with read-only access (PVEAuditor role) for the purpose of metrics collection.

Prometheus Configuration

The PVE exporter can be deployed either directly on a Proxmox VE node or onto a separate machine.

Example config for PVE exporter running on PVE node:

scrape_configs:
  - job_name: 'pve'
    static_configs:
      - targets:
        - 192.168.1.2:9221  # Proxmox VE node with PVE exporter.
        - 192.168.1.3:9221  # Proxmox VE node with PVE exporter.
    metrics_path: /pve
    params:
      module: [default]

Example config for PVE exporter running on Prometheus host:

scrape_configs:
  - job_name: 'pve'
    static_configs:
      - targets:
        - 192.168.1.2  # Proxmox VE node.
        - 192.168.1.3  # Proxmox VE node.
    metrics_path: /pve
    params:
      module: [default]
    relabel_configs:
      - source_labels: [__address__]
        target_label: __param_target
      - source_labels: [__param_target]
        target_label: instance
      - target_label: __address__
        replacement: 127.0.0.1:9221  # PVE exporter.

Grafana Dashboards

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

prometheus-pve-exporter-2.0.1.tar.gz (8.2 kB view details)

Uploaded Source

Built Distribution

prometheus_pve_exporter-2.0.1-py3-none-any.whl (13.1 kB view details)

Uploaded Python 3

File details

Details for the file prometheus-pve-exporter-2.0.1.tar.gz.

File metadata

  • Download URL: prometheus-pve-exporter-2.0.1.tar.gz
  • Upload date:
  • Size: 8.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.0 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.1

File hashes

Hashes for prometheus-pve-exporter-2.0.1.tar.gz
Algorithm Hash digest
SHA256 a098f1790e3779a247b5937ecd5799296907200469d18c5060a8247f83b5e4c2
MD5 d6bb6d5cb7712d510247a3b60724f503
BLAKE2b-256 a8781e4eb47352ec35a2dfed40979650d9ae68ed3acac2357df1807bdaa554e4

See more details on using hashes here.

File details

Details for the file prometheus_pve_exporter-2.0.1-py3-none-any.whl.

File metadata

  • Download URL: prometheus_pve_exporter-2.0.1-py3-none-any.whl
  • Upload date:
  • Size: 13.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.0 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.1

File hashes

Hashes for prometheus_pve_exporter-2.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d9249c7c036ce37c7d4c4b89f881a1eb0664af9545609aefc2a191fa345bb24b
MD5 0be8435c1db2c952e639149b77112bc1
BLAKE2b-256 f8d846f087edddebfa09859986da62f839a01981c85bea022ab4a1f27a5474fa

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page