Update README
This commit is contained in:
32
README.md
32
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
|
||||
|
Reference in New Issue
Block a user