From 069b1b6fc23dbd995be69be340853b00c2a66123 Mon Sep 17 00:00:00 2001 From: Pim van Pelt Date: Mon, 9 Jun 2025 18:19:38 +0200 Subject: [PATCH] Update README --- README.md | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index aea5071..3826065 100644 --- a/README.md +++ b/README.md @@ -69,31 +69,43 @@ CGO_ENABLED=0 go build -ldflags "-X main.version=${VERSION} -X main.buildTime=${ ### Command Line Flags +#### General Application Flags + | Flag | Default | Description | |------|---------|-------------| | `-agentx-addr` | `localhost:705` | AgentX master agent address (hostname:port or Unix socket path) | -| `-vpp-stats-addr` | `/var/run/vpp/stats.sock` | VPP statistics socket path | -| `-period` | `10.0` | Interval in seconds for querying VPP interface stats | -| `-vpp-ifindex-offset` | `1000` | Offset to add to VPP interface indices for SNMP | +| `-debug` | `false` | Enable debug logging | + +#### VPP Statistics Module Flags + +| Flag | Default | Description | +|------|---------|-------------| +| `-vppstats.addr` | `/var/run/vpp/stats.sock` | VPP statistics socket path | +| `-vppstats.period` | `10` | Interval in seconds for querying VPP interface stats | +| `-vppstats.ifindex-offset` | `1000` | Offset to add to VPP interface indices for SNMP | ### Examples ```bash +# Enable debug logging +./vpp-snmp-agent -debug + # Custom polling interval (5 seconds) -./vpp-snmp-agent -period 5.0 +./vpp-snmp-agent -vppstats.period 5 # Custom VPP stats socket -./vpp-snmp-agent -vpp-stats-addr /custom/path/stats.sock +./vpp-snmp-agent -vppstats.addr /custom/path/stats.sock # Custom interface index offset (start at 2000) -./vpp-snmp-agent -vpp-ifindex-offset 2000 +./vpp-snmp-agent -vppstats.ifindex-offset 2000 # Full configuration ./vpp-snmp-agent \ -agentx-addr /var/agentx/master \ - -vpp-stats-addr /var/run/vpp/stats.sock \ - -period 5.0 \ - -vpp-ifindex-offset 1000 + -debug \ + -vppstats.addr /var/run/vpp/stats.sock \ + -vppstats.period 5 \ + -vppstats.ifindex-offset 1000 ``` ## SNMP Interface Mapping @@ -151,7 +163,7 @@ snmpwalk -v2c -c public localhost 1.3.6.1.2.1.31.1.1.1 ### Query with Custom Offset -If running with `-vpp-ifindex-offset 2000`: +If running with `-vppstats.ifindex-offset 2000`: ```bash # Interface 0 counters at index 2000