Skip to main content

Provide customized metrics on data stored in NetBox.

Project description

netbox-more-metrics

Create custom metrics and export information from NetBox into your timeseries database.

Compatibility

NetBox Version Plugin Version
3.4 <= 3.7 0.1.X, 0.2.X
4.0 <= 4.5 0.3.X, 0.4.X

Installing

For adding to a NetBox Docker setup see the general instructions for using netbox-docker with plugins.

Install

pip install netbox-more-metrics

or by adding to your local_requirements.txt or plugin_requirements.txt (netbox-docker):

netbox-more-metrics

Development Install

If you would like to install a version not yet published to pypi.

pip install git+https://github.com/TheDJVG/netbox-more-metrics

or by adding to your local_requirements.txt or plugin_requirements.txt (netbox-docker):

git+https://github.com/TheDJVG/netbox-more-metrics

NetBox Configuration

Enable the plugin in /opt/netbox/netbox/netbox/configuration.py, or if you use netbox-docker, your /configuration/plugins.py file :

PLUGINS = [
    'netbox_more_metrics'
]

If you want to export the configured metrics without authentication set the plugin config export_metrics_without_auth to True. By default, normal NetBox view permissions apply.

PLUGINS_CONFIG = {
    'netbox_more_metrics' : {
        'export_metrics_without_auth': True
    }
}

Features

Custom metrics

For example, you could track the amount of active devices over time by rack and site Example metric

Any model can be exported, data is grouped by the labels.

Filter validation

Every filter is tested on save and also when the metric is initiated for exporting. Example invalid filter

Heavy lifting is done by the database

As much as possible is done in the database directly to take advantage of any Model specific optimizations.

null database values are converted to a string "null".

Functions

  • Metrics can be included in the global metric endpoint (/metrics).
  • Metrics and MetricCollections can be individually exported (as long as the Metric(Collection) is enabled)

Future ideas

  • Adding a way to export utilization (e.g. how many IPs of a prefix are used, or how much power is still available on a feed).

More ideas welcome!

Missing

  • Tests
  • Documentation

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

netbox_more_metrics-0.4.0.tar.gz (14.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

netbox_more_metrics-0.4.0-py3-none-any.whl (23.8 kB view details)

Uploaded Python 3

File details

Details for the file netbox_more_metrics-0.4.0.tar.gz.

File metadata

  • Download URL: netbox_more_metrics-0.4.0.tar.gz
  • Upload date:
  • Size: 14.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.2 CPython/3.13.11 Linux/6.17.9-zen1-1-zen

File hashes

Hashes for netbox_more_metrics-0.4.0.tar.gz
Algorithm Hash digest
SHA256 6c1671aadcfe5f7d60b154daa9da477b14faa30137b1dbc97df28453bd50b509
MD5 5687dbd402378ca57c2d10389668c58f
BLAKE2b-256 bae634c1254919a68d486339331cb8b350efd179f8c1e6abb55adbe035f8ff04

See more details on using hashes here.

File details

Details for the file netbox_more_metrics-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: netbox_more_metrics-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 23.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.2 CPython/3.13.11 Linux/6.17.9-zen1-1-zen

File hashes

Hashes for netbox_more_metrics-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c25618f51f5bdb7b2f2a7a81289b18243d2cc412ecc3cbb2451b99407e747ab6
MD5 00d5ea8f829869b7c0d1274af2782033
BLAKE2b-256 2ff7f87d345bb5d86ad758bd7515c545401fd589a9d5d1f93396397ad45740ac

See more details on using hashes here.

Supported by

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