Full implementation of the nginx dynamic module with: - SO_BINDTODEVICE-based per-interface traffic attribution - Per-worker lock-free counters flushed to shared memory - Prometheus text and JSON scrape endpoint at configurable location - UDP-only global logtail (ipng_stats_logtail) for fire-and-forget access log streaming - $ipng_source_tag nginx variable for use in log_format/map - Histogram buckets, EWMA rate gauges, zone meta-metrics - Debian packaging (libnginx-mod-http-ipng-stats) - Robot Framework end-to-end tests via containerlab - SPDX Apache-2.0 headers on all source files
55 lines
1.4 KiB
YAML
55 lines
1.4 KiB
YAML
# SPDX-License-Identifier: Apache-2.0
|
|
# Containerlab topology for nginx-ipng-stats-plugin end-to-end tests.
|
|
#
|
|
# Three nodes:
|
|
# server — nginx with the module, a slow Python backend, two data-plane interfaces
|
|
# client1 — sends traffic via eth1 (attributed to source_tag=cl1)
|
|
# client2 — sends traffic via eth2 (attributed to source_tag=cl2)
|
|
#
|
|
# Links:
|
|
# server:eth1 ←→ client1:eth1 (10.0.1.0/24)
|
|
# server:eth2 ←→ client2:eth1 (10.0.2.0/24)
|
|
|
|
name: ipng-stats-test
|
|
|
|
mgmt:
|
|
network: ipng-stats-test-net
|
|
ipv4-subnet: 172.20.40.0/24
|
|
|
|
topology:
|
|
nodes:
|
|
server:
|
|
kind: linux
|
|
image: debian:trixie-slim
|
|
mgmt-ipv4: 172.20.40.2
|
|
binds:
|
|
- ../../../build:/opt/build:ro
|
|
- ./server/nginx.conf:/opt/config/nginx.conf:ro
|
|
- ./server/slow-backend.py:/opt/config/slow-backend.py:ro
|
|
- ./server/start.sh:/start.sh:ro
|
|
cmd: bash /start.sh
|
|
|
|
client1:
|
|
kind: linux
|
|
image: debian:trixie-slim
|
|
mgmt-ipv4: 172.20.40.11
|
|
binds:
|
|
- ./client/start.sh:/start.sh:ro
|
|
cmd: bash /start.sh
|
|
env:
|
|
MY_IP: 10.0.1.2/24
|
|
|
|
client2:
|
|
kind: linux
|
|
image: debian:trixie-slim
|
|
mgmt-ipv4: 172.20.40.12
|
|
binds:
|
|
- ./client/start.sh:/start.sh:ro
|
|
cmd: bash /start.sh
|
|
env:
|
|
MY_IP: 10.0.2.2/24
|
|
|
|
links:
|
|
- endpoints: ["server:eth1", "client1:eth1"]
|
|
- endpoints: ["server:eth2", "client2:eth1"]
|