Skip to main content

netbox-plugin-prometheus-http-sd

License: Apache-2.0 CI PyPI

Demo

docker-compose up -d

docker exec netbox-plugin-prometheus-http-sd-netbox-1 /opt/netbox/netbox/manage.py load_initializer_data --path /etc/netbox/initializer-data

Login into Netbox (http://localhost:8080) and create Config Context named prometheus_role_map with the following JSON structure:

{
    "prometheus_exporters": {
        "default": [
            {
                "job": "node-exporter",
                "port": 9100
            }
        ],
        "etcd": [
            {
                "job": "node-exporter",
                "port": 9100
            },
            {
                "job": "etcd-exporter",
                "port": 2379
            }
        ],
        "postgresql": [
            {
                "job": "node-exporter",
                "port": 9100
            },
            {
                "job": "postgresql-exporter",
                "port": 9187
            }
        ],
        "vault": [
            {
                "job": "vault-exporter",
                "scheme": "https",
                "metrics_path": "/v1/sys/metrics",
                "params": {
                    "format": [
                        "prometheus"
                    ]
                },
                "port": 8200
            }
        ]
    }
}

Each role can have multiple jobs (one target per job is generated)

If role is not found, the default entry is used

Usage

The plugin exposes a single API endpoint (no web UI):

GET /api/plugins/prometheus-http-sd/targets/

Device or Virtual Machine is included only if all of the following are true:

  1. It has status active
  2. The custom field role is present and non‑empty

Metrics labels

Labels:

  • job – Prometheus job name defined in the mapping
  • __meta_netbox_name – object name
  • __meta_netbox_type – device or vm
  • __meta_netbox_cf_<custom_field> – every custom field prefixed with __meta_netbox_cf_

Metadata

Release files for netbox-plugin-prometheus-http-sd 0.3.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for netbox-plugin-prometheus-http-sd 0.3.2
File Size Uploaded Provenance Actions
netbox_plugin_prometheus_http_sd-0.3.2.tar.gz 12.6 kB Without provenance Details for netbox_plugin_prometheus_http_sd-0.3.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for netbox-plugin-prometheus-http-sd 0.3.2
File Interpreter ABI Platform Actions
netbox_plugin_prometheus_http_sd-0.3.2-py3-none-any.whl Python 3 none any Details for netbox_plugin_prometheus_http_sd-0.3.2-py3-none-any.whl

Total release size: 22.7 kB

Release files / netbox_plugin_prometheus_http_sd-0.3.2.tar.gz

Download URL netbox_plugin_prometheus_http_sd-0.3.2.tar.gz
Size 12.6 kB
Tags Source
SHA-256 checksum
How to use checksums
db2f766fa4af6930026d778a5071732ddd4c9877f31b871a65c722ac15df200f
BLAKE2b-256 checksum
How to use checksums
355180a9c211a4e00d8725fa410654bed9fa816ebbb953cd5d4ff9e55940fe84
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Release files / netbox_plugin_prometheus_http_sd-0.3.2-py3-none-any.whl

Download URL netbox_plugin_prometheus_http_sd-0.3.2-py3-none-any.whl
Size 10.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
48c8afc5d5dd0189cbce8abf6cd1299c06850b4afbd900757e3f6159261de2d1
BLAKE2b-256 checksum
How to use checksums
83f55100af9aeb8572dd8ef7369f92dc02adcdc5271aa0ea90e3c44911b77596
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Security for netbox-plugin-prometheus-http-sd 0.3.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page