Skip to content

fix: bad metrics endpoint on traefik1 - #111

Merged
DavidePrincipi merged 2 commits into
mainfrom
feat-7544-4
Sep 26, 2025
Merged

DavidePrincipi merged 2 commits into
mainfrom
feat-7544-4

Conversation

@DavidePrincipi

@DavidePrincipi DavidePrincipi commented Sep 25, 2025 •

Copy link
Copy Markdown
Member

This PR fixes two issues:

  1. (main issue) bad Prometheus endpoint configuration for traefik1
  2. wrong name of Prometheus label "node_id"

Main issue:

The VPN IP address is not defined when traefik1 is installed by install.sh. The VPN IP is defined later, by action create-cluster.

Solution:

  1. Use 127.0.0.1 as fallback value if VPN IP address is not defined.
  2. On vpn-changed event (and VPN IP address is defined), replace 127.0.0.1 with the correct IP.

Refs NethServer/dev#7544

Metrics expects NODE_ID in a Prometheus label "node".
The first instance of Traefik has no VPN address and falls back to IP
127.0.0.1 to configure Prometheus scraping.

The first time a node is added to the cluster, replace the fallback
value with the correct VPN IP.
@DavidePrincipi
DavidePrincipi merged commit 36b4161 into main Sep 26, 2025
@DavidePrincipi
DavidePrincipi deleted the feat-7544-4 branch September 26, 2025 07:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant