zerotier / zerotier/ZeroTierOne

[Feature Request] Add label for source_node_id in zerotier promethues metrics

Open
#2,402 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
17.1k
Forks
2k
PR merge metrics
No merged PRs in 30d

Description

Hi,
Currently, the Prometheus metrics exported by Zerotier don't include the source zerotier node which generated them. The documentation says to manually add this label in the scraping job config. This will become a lot of manual works if we want to monitor a lot of zerotier nodes. Also in case of running the zerotier nodes in Kubernetes as pods we will not be able to put this information on ServiceMonitor or PodMonitor due to dynamic nature of the pods.

I suggest enriching the metrics emitted by Zerotier to also include the source node id in the labels of the metrics which are specific to that node. As the node already has the information about its own id it can be a simple operation. For example, the updated metrics will then look like this:

zt_peer_path_count{source_id="wxy123456z",node_id="abc12345de",status="alive"} 0

Thank you.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the C++ code that exports Prometheus metrics, especially the producer of zt_peer_path_count, and review how node-specific labels are currently assembled. Confirm the expected label name and scope from the issue example, then add coverage if an existing metrics test area is found; done means node-specific metrics include the source node ID without requiring scrape-time configuration.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, prometheus
Domain
networking, observability
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.