Nordix / Meridio

Facilitator of attraction and distribution of external traffic within Kubernetes via secondary networks
https://meridio.nordix.org
Apache License 2.0
46 stars 9 forks source link

Collect Metrics #419

Open LionelJouin opened 1 year ago

LionelJouin commented 1 year ago

Is your feature request related to a problem? Please describe.

Add metrics to Meridio to improve observability tools. Here is some slides: https://docs.google.com/presentation/d/1yuiDj7H4NZTea7dJAKPK4SBvkHtZyWrn5HisNe1shuI And OpenTelemetry/Prometheus/Grafana stack deployment instruction: https://gist.github.com/LionelJouin/cfa15a569f1f23d8a84d43dc73b5f373

Describe the solution you'd like

Interface metrics in stateless-lb-frontend / Proxy / TAPA

<interface.metric>: rx_packets, tx_packets, rx_bytes, tx_bytes, rx_errors, tx_errors, rx_dropped, tx_dropped

Interface status in stateless-lb-frontend / Proxy / TAPA ?

Stream status in conduit instance

Flows configured in conduit instance

Targets configured in conduit instance

nft add table inet meridio-metrics
nft add chain inet meridio-metrics target-hits { type filter hook postrouting priority 0 \; }
nft add rule inet meridio-metrics target-hits meta mark 0x13dc counter

Targets configured in conduit instance

Gateways configured in attractor instance

Describe alternatives you've considered /

Additional context https://opentelemetry.io/docs/specs/otel/metrics/semantic_conventions/

tedlean commented 1 year ago

meridio.interface.METRIC_TYPE (Planned):

meridio.conduit.stream.status (Planned):

meridio.conduit.stream.flow.matches:

meridio.conduit.stream.target.packet.hits (Planned)

LionelJouin commented 8 months ago

for non-matched packets, nolb_fwmark in nfqlb could be used to blackhole traffic in policy route and then counting in the same way as the targets using nftables