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
|
### Command Line Flags
|
||||||
|
|
||||||
|
#### General Application Flags
|
||||||
|
|
||||||
| Flag | Default | Description |
|
| Flag | Default | Description |
|
||||||
|------|---------|-------------|
|
|------|---------|-------------|
|
||||||
| `-agentx-addr` | `localhost:705` | AgentX master agent address (hostname:port or Unix socket path) |
|
| `-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 |
|
| `-debug` | `false` | Enable debug logging |
|
||||||
| `-period` | `10.0` | Interval in seconds for querying VPP interface stats |
|
|
||||||
| `-vpp-ifindex-offset` | `1000` | Offset to add to VPP interface indices for SNMP |
|
#### 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
|
### Examples
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
# Enable debug logging
|
||||||
|
./vpp-snmp-agent -debug
|
||||||
|
|
||||||
# Custom polling interval (5 seconds)
|
# Custom polling interval (5 seconds)
|
||||||
./vpp-snmp-agent -period 5.0
|
./vpp-snmp-agent -vppstats.period 5
|
||||||
|
|
||||||
# Custom VPP stats socket
|
# 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)
|
# Custom interface index offset (start at 2000)
|
||||||
./vpp-snmp-agent -vpp-ifindex-offset 2000
|
./vpp-snmp-agent -vppstats.ifindex-offset 2000
|
||||||
|
|
||||||
# Full configuration
|
# Full configuration
|
||||||
./vpp-snmp-agent \
|
./vpp-snmp-agent \
|
||||||
-agentx-addr /var/agentx/master \
|
-agentx-addr /var/agentx/master \
|
||||||
-vpp-stats-addr /var/run/vpp/stats.sock \
|
-debug \
|
||||||
-period 5.0 \
|
-vppstats.addr /var/run/vpp/stats.sock \
|
||||||
-vpp-ifindex-offset 1000
|
-vppstats.period 5 \
|
||||||
|
-vppstats.ifindex-offset 1000
|
||||||
```
|
```
|
||||||
|
|
||||||
## SNMP Interface Mapping
|
## 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
|
### Query with Custom Offset
|
||||||
|
|
||||||
If running with `-vpp-ifindex-offset 2000`:
|
If running with `-vppstats.ifindex-offset 2000`:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Interface 0 counters at index 2000
|
# Interface 0 counters at index 2000
|
||||||
|
Reference in New Issue
Block a user