[Feature] Add high-level server metrics #1045

Closed
opened 2025-12-29 02:27:55 +01:00 by adam · 7 comments
Owner

Originally created by @SamyDjemai on GitHub (Jun 19, 2025).

Use case

We want to keep track of the online user count, total user count, online node count, total node count, etc. in Datadog to better correlate some issues with the current network state.

Description

Add several high-level metrics on the /metrics endpoint, including:

  • Total user count
  • Online user count
  • Total node count
  • Online node count
  • Total route count

These are the main ones I can think of, but there are other metrics that could be interesting from an admin's point of view.

Contribution

  • I can write the design doc for this feature
  • I can contribute this feature

How can it be implemented?

Periodically fetch these values from the server state, the database, or elsewhere relevant, and display them as Prometheus metrics on the /metrics endpoint

Originally created by @SamyDjemai on GitHub (Jun 19, 2025). ### Use case We want to keep track of the online user count, total user count, online node count, total node count, etc. in Datadog to better correlate some issues with the current network state. ### Description Add several high-level metrics on the `/metrics` endpoint, including: - [ ] Total user count - [ ] Online user count - [ ] Total node count - [ ] Online node count - [ ] Total route count These are the main ones I can think of, but there are other metrics that could be interesting from an admin's point of view. ### Contribution - [ ] I can write the design doc for this feature - [ ] I can contribute this feature ### How can it be implemented? Periodically fetch these values from the server state, the database, or elsewhere relevant, and display them as Prometheus metrics on the `/metrics` endpoint
adam added the enhancementno-stale-bot labels 2025-12-29 02:27:55 +01:00
adam closed this issue 2025-12-29 02:27:55 +01:00
Author
Owner

@lucasRolff commented on GitHub (Jun 22, 2025):

I'd love this too!

@lucasRolff commented on GitHub (Jun 22, 2025): I'd love this too!
Author
Owner

@github-actions[bot] commented on GitHub (Sep 21, 2025):

This issue is stale because it has been open for 90 days with no activity.

@github-actions[bot] commented on GitHub (Sep 21, 2025): This issue is stale because it has been open for 90 days with no activity.
Author
Owner

@SamyDjemai commented on GitHub (Sep 21, 2025):

Hi, this feature request is still relevant as it would be very useful for debugging

@SamyDjemai commented on GitHub (Sep 21, 2025): Hi, this feature request is still relevant as it would be very useful for debugging
Author
Owner

@enekux commented on GitHub (Oct 4, 2025):

There is a Github project that has done just this, but for now, it only works with Tailscale's API:

https://github.com/adinhodovic/tailscale-exporter

@enekux commented on GitHub (Oct 4, 2025): There is a Github project that has done just this, but for now, it only works with Tailscale's API: https://github.com/adinhodovic/tailscale-exporter
Author
Owner

@Rohlik commented on GitHub (Nov 5, 2025):

This would be really useful 🤩!

@Rohlik commented on GitHub (Nov 5, 2025): This would be really useful 🤩!
Author
Owner

@adinhodovic commented on GitHub (Dec 5, 2025):

There is a Github project that has done just this, but for now, it only works with Tailscale's API:

https://github.com/adinhodovic/tailscale-exporter

Added headscale support fwiw by :)

With a Grafana dashboard:

Image
@adinhodovic commented on GitHub (Dec 5, 2025): > There is a Github project that has done just this, but for now, it only works with Tailscale's API: > > https://github.com/adinhodovic/tailscale-exporter Added headscale support fwiw by :) With a Grafana dashboard: <img width="3814" height="1757" alt="Image" src="https://github.com/user-attachments/assets/fb9f47c0-f950-4e97-af59-106c33ff16d9" />
Author
Owner

@SamyDjemai commented on GitHub (Dec 18, 2025):

Added headscale support fwiw by :)

Nice, I can confirm that tailscale-exporter has all the metrics we need, thank you @adinhodovic 😄

@SamyDjemai commented on GitHub (Dec 18, 2025): > Added headscale support fwiw by :) Nice, I can confirm that tailscale-exporter has all the metrics we need, thank you @adinhodovic 😄
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#1045