Skip to content

Expose Prometheus metrics #3104

@lampwins

Description

@lampwins

Environment

  • Python version: 3.7
  • NetBox version: develop-2.6

Proposed Functionality

As NetBox continues to grow in both functionality and the scale at which users deploy the application, the need for more insight into performance has become apparent. Prometheus is a time series metric platform which has become quite popular in the monitoring space. This is to propose exposing Prometheus metrics from the NetBox codebase by way of django-prometheus and the client_python Prometheus libraries.

Use Case

As an administrator of NetBox, there is a need to better monitor and understand the running performance state of NetBox. Prometheus will allow us to expose metrics about the run time environment resources, request and response times per django view, database query performance, and more. All of these metrics will be exposed via /metrics in the standard Prometheus fashion.

Administrators will be able to toggle whether or not metrics are exposed on this endpoint with a simple configuration parameter.

Database Changes

No schema changes, but django-prometheus will proxy a middleware to obtain performance metrics on database calls.

External Dependencies

New dependency on django-prometheus which is stable, mature, and used in many django projects.

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: acceptedThis issue has been accepted for implementation

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions