24 Commits

Author SHA1 Message Date
Cooper Ry Lees
145d2bf000 Rename PathLength to HopCount in swagger model and UI
Rename the swagger field from path-length to hop-count so the
generated Go struct field (PathLength → HopCount) and JSON key
(path-length → hop-count) align with the Prometheus metric rename
to goldpinger_peers_hop_count from the previous commit.

Signed-off-by: Cooper Ry Lees <me@cooperlees.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 19:45:31 +00:00
Cooper Ry Lees
832bc7b598 Add UDP probe metrics: packet loss, hop count, and RTT
Add an opt-in UDP echo probe that runs alongside the existing HTTP
ping. Each goldpinger pod listens on a configurable UDP port (default
6969). During each ping cycle, the prober sends N sequenced packets
to the peer's listener, which echoes them back. From the replies we
compute packet loss percentage, path hop count (from IPv4 TTL / IPv6
HopLimit), and average round-trip time.

New Prometheus metrics:
  - goldpinger_peers_loss_pct      (gauge)     — per-peer UDP loss %
  - goldpinger_peers_path_length   (gauge)     — estimated hop count
  - goldpinger_peers_udp_rtt_ms    (histogram) — UDP RTT in milliseconds

The graph UI shows yellow edges for links with partial loss, and
displays sub-millisecond UDP RTT instead of HTTP latency when UDP
is enabled. Stale metric labels are cleaned up when a pinger is
destroyed so rolled pods don't leave ghost entries.

Configuration (all via env vars, disabled by default):
  UDP_ENABLED=true      enable UDP probing and listener
  UDP_PORT=6969         listener port
  UDP_PACKET_COUNT=10   packets per probe
  UDP_PACKET_SIZE=64    bytes per packet
  UDP_TIMEOUT=1s        probe timeout

New files:
  pkg/goldpinger/udp_probe.go       — echo listener + probe client
  pkg/goldpinger/udp_probe_test.go  — unit tests

Unit tests:
```
=== RUN   TestProbeUDP_NoLoss
    udp_probe_test.go:51: avg UDP RTT: 0.0823 ms
--- PASS: TestProbeUDP_NoLoss (0.00s)
=== RUN   TestProbeUDP_FullLoss
--- PASS: TestProbeUDP_FullLoss (0.00s)
=== RUN   TestProbeUDP_PacketFormat
--- PASS: TestProbeUDP_PacketFormat (0.00s)
=== RUN   TestEstimateHops
--- PASS: TestEstimateHops (0.00s)
PASS
```

Cluster test (6-node IPv6 k8s, UDP_ENABLED=true):
```
Prometheus metrics (healthy cluster, 0% loss):
  goldpinger_peers_loss_pct{...,pod_ip="fd00:4:69:3::3746"} 0
  goldpinger_peers_path_length{...,pod_ip="fd00:4:69:3::3746"} 0

Simulated 50% loss via ip6tables DROP in pod netns on node-0:
  goldpinger_peers_loss_pct{instance="server",...} 60
  goldpinger_peers_loss_pct{instance="node-1",...} 30
  goldpinger_peers_loss_pct{instance="server2",...} 30

UDP RTT vs HTTP RTT (check_all API):
  node-0 -> server:  udp=2.18ms  http=2ms
  node-2 -> node-2:  udp=0.40ms  http=1ms
  server -> node-0:  udp=0.55ms  http=2ms

Post-rollout stale metrics cleanup verified:
  All 36 edges show 0% loss, no stale pod IPs.
```

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Cooper Ry Lees <me@cooperlees.com>
2026-03-27 16:05:32 +00:00
tgetachew
14ea96999a add external probes
Signed-off-by: kitfoman <thaddeusgetachew@gmail.com>

make timeout flags backwards compatible

Signed-off-by: kitfoman <thaddeusgetachew@gmail.com>
2022-05-08 22:02:09 -04:00
Sachin Kamboj
e3942bd5eb Fix the crashing UI
Signed-off-by: Sachin Kamboj <skamboj1@bloomberg.net>
2020-04-06 20:33:25 -04:00
Sandeep Mendiratta
0870833cf5 minor typo correction in heat map page. Also updated version and Readme with new version
Signed-off-by: Sandeep Mendiratta <smendiratta@yahoo.com>
2020-03-22 16:28:22 -05:00
Mikolaj Pawlikowski
8a014ad7f4 Merge branch 'master' into master 2019-09-05 13:58:20 +01:00
Luke Alexander
ac9bf4224d make all paths relative to allow for hosting at a sub path of root
Signed-off-by: Luke Alexander <luke.alexander@mixcloud.com>
2019-09-05 11:10:23 +01:00
Chris Green
dc3864f170 Colour the dns nodes red for any failures
Signed-off-by: Chris Green <34572557+cgreen12@users.noreply.github.com>
2019-06-09 09:11:49 -04:00
Chris Green
8a759433eb Show the info for dns nodes
Signed-off-by: Chris Green <34572557+cgreen12@users.noreply.github.com>
2019-06-09 08:53:52 -04:00
Chris Green
9adf26e2cb Consistency ftw
Signed-off-by: Chris Green <34572557+cgreen12@users.noreply.github.com>
2019-06-09 08:43:47 -04:00
Chris Green
927125bbc5 slight re-positioning
Signed-off-by: Chris Green <34572557+cgreen12@users.noreply.github.com>
2019-06-09 07:37:48 -04:00
Chris Green
7585d010a6 Initial UI changes
Signed-off-by: Chris Green <34572557+cgreen12@users.noreply.github.com>
2019-06-05 14:56:37 -04:00
Mikolaj Pawlikowski
d8f8c20927 make the graph work with edges to nodes that are not reporting
Signed-off-by: Mikolaj Pawlikowski <mikolaj@pawlikowski.pl>
2019-03-14 08:13:44 -04:00
Mikolaj Pawlikowski
767d2dba7f quick test of how to integrate with the UI
Signed-off-by: Mikolaj Pawlikowski <mikolaj@pawlikowski.pl>
2019-02-21 17:41:19 +00:00
Mikolaj Pawlikowski
4c4c596791 typo
Signed-off-by: Mikolaj Pawlikowski <mikolaj@pawlikowski.pl>
2019-02-18 17:32:45 +00:00
Mikolaj Pawlikowski
0a5d80e2bf remove dependency on lodash
Signed-off-by: Mikolaj Pawlikowski <mikolaj@pawlikowski.pl>
2019-02-18 17:28:24 +00:00
Mikolaj Pawlikowski
d52a850d2e replaced the cnd jquery with https://github.com/jquery/jquery/releases/tag/3.1.0
Signed-off-by: Mikolaj Pawlikowski <mikolaj@pawlikowski.pl>
2019-02-18 17:06:42 +00:00
Mikolaj Pawlikowski
2465ecf21b replace the cdn bootstrap with the release downloaded from
https://github.com/twbs/bootstrap/releases/tag/v3.3.7:wq

Signed-off-by: Mikolaj Pawlikowski <mikolaj@pawlikowski.pl>
2019-02-18 17:00:13 +00:00
Mikolaj Pawlikowski
24028c3d55 update index.html to use the downloaded full release
Signed-off-by: Mikolaj Pawlikowski <mikolaj@pawlikowski.pl>
2019-02-18 16:47:12 +00:00
Mikolaj Pawlikowski
4af45574fe Check in a full release of sigma.js 1.1.0 from github from https://github.com/jacomyal/sigma.js/releases/tag/v1.1.0
Signed-off-by: Mikolaj Pawlikowski <mikolaj@pawlikowski.pl>
2019-02-18 16:43:01 +00:00
Mikolaj Pawlikowski
6a483f2590 delete the cloudflare version of the release of sigma.js
Signed-off-by: Mikolaj Pawlikowski <mikolaj@pawlikowski.pl>
2019-02-18 16:41:08 +00:00
jpmondet
841fbb49c9 Add remote dependencies and linked them in index.html
Signed-off-by: jpmondet <jp@mondet.org>
2019-01-09 21:22:55 +01:00
Christopher Adigun
c2b0cd2188 Fix broken links in the UI when accessed via an Ingress
Signed-off-by: Christopher Adigun <ca@cloudssky.com>
2018-12-20 09:20:11 +01:00
Kevin P. Fleming
fa643e9be8 Initial commit 2018-12-04 13:33:45 -05:00