Add flag -vppstats.api.addr and rename -vppstats.addr to -vppstats.stats.addr; Update README

This commit is contained in:
Pim van Pelt
2025-06-10 14:16:05 +02:00
parent 87327658b2
commit 8d9aef2f99
2 changed files with 13 additions and 7 deletions

View File

@ -87,7 +87,8 @@ CGO_ENABLED=0 go build -ldflags "-X main.version=${VERSION} -X main.buildTime=${
| Flag | Default | Description |
|------|---------|-------------|
| `-vppstats.addr` | `/var/run/vpp/stats.sock` | VPP statistics socket path |
| `-vppstats.api.addr` | `/var/run/vpp/api.sock` | VPP API socket path |
| `-vppstats.stats.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 |
@ -101,7 +102,10 @@ CGO_ENABLED=0 go build -ldflags "-X main.version=${VERSION} -X main.buildTime=${
./govpp-snmp-agentx -vppstats.period 5
# Custom VPP stats socket
./govpp-snmp-agentx -vppstats.addr /custom/path/stats.sock
./govpp-snmp-agentx -vppstats.stats.addr /custom/path/stats.sock
# Custom VPP API socket
./govpp-snmp-agentx -vppstats.api.addr /custom/path/api.sock
# Custom interface index offset (start at 2000)
./govpp-snmp-agentx -vppstats.ifindex-offset 2000
@ -114,7 +118,8 @@ CGO_ENABLED=0 go build -ldflags "-X main.version=${VERSION} -X main.buildTime=${
-agentx.addr /var/agentx/master \
-debug \
-vppcfg /etc/vpp/vppcfg.yaml \
-vppstats.addr /var/run/vpp/stats.sock \
-vppstats.api.addr /var/run/vpp/api.sock \
-vppstats.stats.addr /var/run/vpp/stats.sock \
-vppstats.period 5 \
-vppstats.ifindex-offset 1000
```