Skip to main content

App to improve the instrumentation of Nautobot and expose additional metrics (Application Metrics, RQ Worker).

Project description

Metrics & Monitoring Extension App



An App for Nautobot.

Metrics Endpoints

Nautobot already exposes some information via a Prometheus endpoint but the information currently available are mostly at the system level and not at the application level. System metrics and application level metrics are complementary with each other.

  • SYSTEM Metrics are very useful to instrument code, track ephemeral information and get a better visibility into what is happening. (Example of metrics: nbr of requests, requests per second, nbr of exceptions, response time, etc ...) The idea is that when multiple instances of Nautobot are running behind a load balancer each one will produce a different set of metrics and the monitoring system needs to collect these metrics from all running instances and aggregate them in a dashboard. Nautobot exposes some system metrics at localhost/metrics - read more in the Nautobot Documentation.
  • APPLICATION Metrics are at a higher level and represent information that is the same across all instances of an application running behind a load balancer. If I have 3 instances of Nautobot running, there is no point to ask each of them how many Device objects I have in the database, since they will always return the same information. In this case, the goal is to expose only 1 endpoint that can be served by any running instance. The prometheus endpoint is at /api/plugins/capacity-metrics/app-metrics.

Currently the app exposes these simple metrics by default:

  • Jobs stats
  • Models count (configurable via nautobot_config.py)

In addition, it is possible to use the app configuration to expose metrics about the versions of Python, Django, Nautobot and the installed Nautobot apps/apps.

Try it out!

This App is installed in the Nautobot Community Sandbox found over at demo.nautobot.com!

For a full list of all the available always-on sandbox environments, head over to the main page on networktocode.com.

Documentation

Full documentation for this App can be found over on the Nautobot Docs website:

Contributing to the Documentation

You can find all the Markdown source for the App documentation under the docs folder in this repository. For simple edits, a Markdown capable editor is sufficient: clone the repository and edit away.

If you need to view the fully-generated documentation site, you can build it with MkDocs. A container hosting the documentation can be started using the invoke commands (details in the Development Environment Guide) on http://localhost:8001. Using this container, as your changes to the documentation are saved, they will be automatically rebuilt and any pages currently being viewed will be reloaded in your browser.

Any PRs with fixes or improvements are very welcome!

Questions

For any questions or comments, please check the FAQ first. Feel free to also swing by the Network to Code Slack (channel #nautobot), sign up here if you don't have an account.

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

nautobot_capacity_metrics-4.0.0a1.tar.gz (1.3 MB view details)

Uploaded Source

Built Distribution

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

nautobot_capacity_metrics-4.0.0a1-py3-none-any.whl (1.3 MB view details)

Uploaded Python 3

File details

Details for the file nautobot_capacity_metrics-4.0.0a1.tar.gz.

File metadata

File hashes

Hashes for nautobot_capacity_metrics-4.0.0a1.tar.gz
Algorithm Hash digest
SHA256 f74ac34dc02fe2d4a25abf70460233eedd3dd43d0a4a26f6306390089acf1f88
MD5 e997021eeafc325f2d99e053308a72aa
BLAKE2b-256 182aaaba13da9be48facc295f08954deffd12c1db8fe7fbc6a177c05265587ea

See more details on using hashes here.

Provenance

The following attestation bundles were made for nautobot_capacity_metrics-4.0.0a1.tar.gz:

Publisher: release.yml on nautobot/nautobot-app-capacity-metrics

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nautobot_capacity_metrics-4.0.0a1-py3-none-any.whl.

File metadata

File hashes

Hashes for nautobot_capacity_metrics-4.0.0a1-py3-none-any.whl
Algorithm Hash digest
SHA256 d1797717badde0c300b2c80c02465c1647e404685690c9600bb01848d95c0d3b
MD5 f2f7b5c836bd10e0c8558047b17c677a
BLAKE2b-256 eb63ee9031e8162fa8f922ab04ee370161c275ae31729f174de2ee9c51c4ef9d

See more details on using hashes here.

Provenance

The following attestation bundles were made for nautobot_capacity_metrics-4.0.0a1-py3-none-any.whl:

Publisher: release.yml on nautobot/nautobot-app-capacity-metrics

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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