Rename from govpp-snmp-exmaple to govpp-snmp-agentx; Also rename the binary + README

This commit is contained in:
Pim van Pelt
2025-06-10 13:41:14 +02:00
parent 467975b9d6
commit 478168584d
8 changed files with 26 additions and 27 deletions

View File

@ -29,7 +29,7 @@ The application consists of four main components:
### Development Build
```bash
go build -o vpp-snmp-agent .
go build -o govpp-snmp-agentx .
```
### Static Binary Build
@ -38,11 +38,11 @@ For deployment without Go runtime dependencies:
```bash
# Linux static binary
CGO_ENABLED=0 GOOS=linux go build -a -ldflags '-extldflags "-static"' -o vpp-snmp-agent .
CGO_ENABLED=0 GOOS=linux go build -a -ldflags '-extldflags "-static"' -o govpp-snmp-agentx .
# Cross-compile for different architectures
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -ldflags '-extldflags "-static"' -o vpp-snmp-agent-linux-amd64 .
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -a -ldflags '-extldflags "-static"' -o vpp-snmp-agent-linux-arm64 .
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -ldflags '-extldflags "-static"' -o govpp-snmp-agentx-linux-amd64 .
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -a -ldflags '-extldflags "-static"' -o govpp-snmp-agentx-linux-arm64 .
```
### Release Build with Version Info
@ -50,7 +50,7 @@ CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -a -ldflags '-extldflags "-static
```bash
VERSION=$(git describe --tags --always --dirty)
BUILD_TIME=$(date -u '+%Y-%m-%d_%H:%M:%S')
CGO_ENABLED=0 go build -ldflags "-X main.version=${VERSION} -X main.buildTime=${BUILD_TIME}" -o vpp-snmp-agent .
CGO_ENABLED=0 go build -ldflags "-X main.version=${VERSION} -X main.buildTime=${BUILD_TIME}" -o govpp-snmp-agentx .
```
## Usage
@ -59,13 +59,13 @@ CGO_ENABLED=0 go build -ldflags "-X main.version=${VERSION} -X main.buildTime=${
```bash
# Run with default settings
./vpp-snmp-agent
./govpp-snmp-agentx
# Run with custom AgentX address
./vpp-snmp-agent -agentx.addr 127.0.0.1:705
./govpp-snmp-agentx -agentx.addr 127.0.0.1:705
# Run with Unix socket AgentX connection
./vpp-snmp-agent -agentx.addr /var/agentx/master
./govpp-snmp-agentx -agentx.addr /var/agentx/master
```
### Command Line Flags
@ -95,22 +95,22 @@ CGO_ENABLED=0 go build -ldflags "-X main.version=${VERSION} -X main.buildTime=${
```bash
# Enable debug logging
./vpp-snmp-agent -debug
./govpp-snmp-agentx -debug
# Custom polling interval (5 seconds)
./vpp-snmp-agent -vppstats.period 5
./govpp-snmp-agentx -vppstats.period 5
# Custom VPP stats socket
./vpp-snmp-agent -vppstats.addr /custom/path/stats.sock
./govpp-snmp-agentx -vppstats.addr /custom/path/stats.sock
# Custom interface index offset (start at 2000)
./vpp-snmp-agent -vppstats.ifindex-offset 2000
./govpp-snmp-agentx -vppstats.ifindex-offset 2000
# With VPP configuration file for interface descriptions
./vpp-snmp-agent -vppcfg /etc/vpp/vppcfg.yaml
./govpp-snmp-agentx -vppcfg /etc/vpp/vppcfg.yaml
# Full configuration
./vpp-snmp-agent \
./govpp-snmp-agentx \
-agentx.addr /var/agentx/master \
-debug \
-vppcfg /etc/vpp/vppcfg.yaml \