Skip to main content

netbox-opentelemetry-plugin

netbox-opentelemetry-plugin exports NetBox telemetry (logs, audit records, traces and metrics) over OTLP to an OpenTelemetry Collector, directly from inside the NetBox processes (web workers, RQ workers, RQ work-horses). Each signal is an independent module, switched on or off in configuration.

Signals

Signal Default Description
Logs on NetBox's Python logs, exported through the OTel Logs API.
Audit records on One structured record per ObjectChange (create, update, delete).
Traces off Spans for Django requests, PostgreSQL, Redis, outbound HTTP and RQ jobs.
Metrics off HTTP and job metrics, change counters, optional process runtime metrics.

Screenshots

Taken in Grafana from the dev stack's ui profile (make dev-ui). Any OTLP backend works, through a Collector or with the exporter pointed at it directly.

Audit records in Loki, one per ObjectChange, with the change and the user as attributes, and the trace id of the request:

NetBox audit records in Grafana Explore, Loki data source, shown as a table of change action, object type, object, user, process role and trace id

A REST API request trace in Tempo, with its PostgreSQL and Redis spans:

A NetBox API request trace in Grafana Explore, Tempo data source, with its database and Redis spans

HTTP server request rate per route in Prometheus:

NetBox HTTP server request rate per route in Grafana Explore, Prometheus data source

Compatibility

Plugin NetBox Python
0.4.x 4.7.2 to 4.7.x 3.12, 3.13, 3.14
0.1.x to 0.3.x 4.7.0 to 4.7.x 3.12, 3.13, 3.14

min_version = "4.7.2" and max_version = "4.7.99" in the plugin's PluginConfig enforce this NetBox range; NetBox refuses to load the plugin outside it. NetBox 4.7.0 and 4.7.1 recorded plaintext API tokens created through background bulk requests in job results, fixed in 4.7.2. On those versions, upgrade NetBox before upgrading the plugin, or stay on 0.3.x: NetBox skips a plugin whose min_version is above its own version with a warning, and nothing is exported.

Dependencies

Installing the package pulls in these OpenTelemetry packages, no others:

  • opentelemetry-api ~= 1.44.0
  • opentelemetry-sdk ~= 1.44.0
  • opentelemetry-exporter-otlp-proto-http ~= 1.44.0
  • opentelemetry-exporter-otlp-proto-grpc ~= 1.44.0
  • opentelemetry-instrumentation-django == 0.65b0
  • opentelemetry-instrumentation-psycopg == 0.65b0
  • opentelemetry-instrumentation-redis == 0.65b0
  • opentelemetry-instrumentation-requests == 0.65b0
  • opentelemetry-instrumentation-system-metrics == 0.65b0

No NetBox model, no database migration and no UI of its own.

Quick start

Install the package into the NetBox virtual environment:

source /opt/netbox/venv/bin/activate
pip install netbox-opentelemetry-plugin

netbox-docker's venv has no pip, only uv: use uv pip install netbox-opentelemetry-plugin in a custom image built on top of the upstream one. See the installation page for netbox-docker, the Helm chart, and bare metal gunicorn and uWSGI.

Enable the plugin in configuration.py:

PLUGINS = ["netbox_opentelemetry_plugin"]
PLUGINS_CONFIG = {
    "netbox_opentelemetry_plugin": {
        "exporter": {"endpoint": "http://otel-collector:4318"},
    },
}

Turn on traces and metrics too:

PLUGINS_CONFIG = {
    "netbox_opentelemetry_plugin": {
        "exporter": {"endpoint": "http://otel-collector:4318"},
        "traces": {"enabled": True},
        "metrics": {"enabled": True},
    },
}

Restart the NetBox web processes and the RQ workers to pick up the change.

Documentation

Licence

Apache 2.0. See the LICENSE file.

Metadata

Release files for netbox-opentelemetry-plugin 0.4.0

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-opentelemetry-plugin 0.4.0
File Size Uploaded Provenance Actions
netbox_opentelemetry_plugin-0.4.0.tar.gz 54.4 kB With provenance Details for netbox_opentelemetry_plugin-0.4.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for netbox-opentelemetry-plugin 0.4.0
File Interpreter ABI Platform Actions
netbox_opentelemetry_plugin-0.4.0-py3-none-any.whl Python 3 none any Details for netbox_opentelemetry_plugin-0.4.0-py3-none-any.whl

Total release size: 112.5 kB

Release files / netbox_opentelemetry_plugin-0.4.0.tar.gz

Download URL netbox_opentelemetry_plugin-0.4.0.tar.gz
Size 54.4 kB
Tags Source
SHA-256 checksum
How to use checksums
429f0ef93c72e9d0e7517e293085014adc4d8633917ca5c8ab425e961a1521d7
BLAKE2b-256 checksum
How to use checksums
55f1baf0633cfc965e9e052b6d4edc953125c1b8519403c963be767eb30a717b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.

Transparency log

Release files / netbox_opentelemetry_plugin-0.4.0-py3-none-any.whl

Download URL netbox_opentelemetry_plugin-0.4.0-py3-none-any.whl
Size 58.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7a1fc4adaeca2502c02db92933218b2ea41049bf1e4f374561e6bdae4f531bd1
BLAKE2b-256 checksum
How to use checksums
89d5f88c53c02d75f1c94b1d6ba20f3319aff96c5ed537b1793b81f3aae1ed1d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.

Transparency log

Security for netbox-opentelemetry-plugin 0.4.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for netbox_opentelemetry_plugin-0.4.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.

Transparency log

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