Exclude /metrics from LOGIN_REQUIRED #2564

Closed
opened 2025-12-29 18:20:00 +01:00 by adam · 1 comment
Owner

Originally created by @larsweiler on GitHub (Apr 30, 2019).

Environment

  • Python version: 3.7.3
  • NetBox version: 2.6-beta1

Proposed Functionality

With Prometheus Metrics from #3104 enabled and also LOGIN_REQUIRED enabled, the URL /metrics will redirect to the login page. This merge request will exclude /metrics from LOGIN_REQUIRED in the same way as /api is excluded.

Use Case

For monitoring with Prometheus a user login on a webpage is not feasible. Prometheus should access the metrics without login.

Database Changes

None.

External Dependencies

None.

Originally created by @larsweiler on GitHub (Apr 30, 2019). ### Environment * Python version: 3.7.3 * NetBox version: 2.6-beta1 ### Proposed Functionality With Prometheus Metrics from #3104 enabled and also `LOGIN_REQUIRED` enabled, the URL `/metrics` will redirect to the login page. This merge request will exclude `/metrics` from `LOGIN_REQUIRED` in the same way as `/api` is excluded. ### Use Case For monitoring with Prometheus a user login on a webpage is not feasible. Prometheus should access the metrics without login. ### Database Changes None. ### External Dependencies None.
adam added the type: bugstatus: accepted labels 2025-12-29 18:20:00 +01:00
adam closed this issue 2025-12-29 18:20:00 +01:00
Author
Owner

@lampwins commented on GitHub (Apr 30, 2019):

Closed in #3124

@lampwins commented on GitHub (Apr 30, 2019): Closed in #3124
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#2564