Skip to content

yanic: 2.1.1+batmanv5, write Parker CLAT and mesh VPN peer metrics - #1102

Merged
awlx merged 1 commit into
mainfrom
awlx-yanic-parker-metrics
Nov 21, 2026
Merged

awlx merged 1 commit into
mainfrom
awlx-yanic-parker-metrics

Conversation

@awlx

@awlx awlx commented Nov 21, 2026 •

Copy link
Copy Markdown
Member

Summary

Write the Parker node data for CLAT and the mesh VPN tunnels to InfluxDB (database yanic), so that Grafana can show it.

Changes

  • yanic package yanic_2.1.1+batmanv5-2_amd64.deb in yanic/init.sls (production yanic, gw04) and parker/yanic/init.sls (pgw01-04).
  • yanic/yanic.conf.tmpl (only the production yanic writes to InfluxDB): [respondd.metrics] with 2 rules:
    • statistics.clat.{direction} to measurement clat (fields packets, bytes; tag direction).
    • statistics.mesh_vpn.groups.{group}.peers.{peer} to measurement mesh_vpn_peer (fields established in seconds, method with active = 1, standby = 0; tags group, peer).
  • No gateway or peer names are in the config. Each point also has the tags nodeid, hostname, site, domain.
  • Other Gluon nodes that send mesh_vpn peers also get mesh_vpn_peer points (same rule).

Why the pgws need the new package

The pgws forward the node data to the production yanic (database.connection.respondd). The old yanic sent only keys with a Go field, so clat and method were lost. freifunkMUC/yanic#4 sends the received data unchanged.

Related pull requests

PR State
freifunkMUC/yanic#2 (sync with upstream) merged
freifunkMUC/yanic#3 ([respondd.metrics]) merged
freifunkMUC/yanic#4 (forward the received data unchanged) merged as 3409927, tag v2.1.1+batmanv5
freifunkMUC/yanic-deb#7 (package 2.1.1+batmanv5) open, CI green

Package

https://apt.ffmuc.net/yanic_2.1.1%2Bbatmanv5-2_amd64.deb is live.
sha256 f28ddef1adc212415a24bf7c2b6ecc21fcbb06cd56e050471f10101dd9b156fd (same as the CI artifact of freifunkMUC/yanic-deb#7; checked over the public URL).

Tests

  • Rendered yanic/yanic.conf.tmpl with Jinja2 and test pillar data. Started yanic (branch of yanic#4) with it: the config loads, the metrics rules are accepted.
  • Chain test on a local machine: test node (with clat and 2 mesh_vpn peers, active and standby) sends to a "pgw" yanic on port 11001; it forwards to a "gw04" yanic with the rendered config; this writes to a fake InfluxDB. Result:
    clat,direction=v4_to_v6,...,nodeid=deadbeef0001,... bytes=3400,packets=12
    clat,direction=v6_to_v4,...,nodeid=deadbeef0001,... bytes=2900,packets=10
    mesh_vpn_peer,...,group=muc01,...,peer=pgwA,... established=3600,method=1
    mesh_vpn_peer,...,group=muc01,...,peer=pgwB,... established=120,method=0
    
  • go test ./... in yanic#4: pass.

Not tested

  • state.apply on gw04 and the pgws. After the merge: one host at a time, test=True first.
  • Real Parker node data in the live InfluxDB.

Rollout and rollback

  • Order: gw04 first (metrics rules), then pgw01 to pgw04, one at a time. After each host: yanic runs, map-parker updates, new measurements come in.
  • Rollback: revert this PR and apply (package 2.1.1+batmanv4-2 and the old config).

- Package yanic_2.1.1+batmanv5-2 on the production yanic and the pgws.
  The pgws now forward the respondd data unchanged (yanic#4).
- Production yanic: [respondd.metrics] rules for statistics.clat.{direction}
  (measurement clat) and statistics.mesh_vpn.groups.{group}.peers.{peer}
  (measurement mesh_vpn_peer, method active=1 standby=0).
@awlx
awlx marked this pull request as ready for review November 21, 2026 16:57
@awlx
awlx requested a review from a team as a code owner November 21, 2026 16:57
@awlx
awlx merged commit af03587 into main Nov 21, 2026
15 checks passed
@awlx
awlx deleted the awlx-yanic-parker-metrics branch November 21, 2026 16:57
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