towerops-agent/docker-compose.example.yml
Graham McIntire 89adc3a6b3
Add SNMP trap listener for v1 and v2c traps
- Add trap.rs with BER/ASN.1 parser for SNMP trap PDUs
- Support both SNMPv1 and SNMPv2c trap formats
- Listen on configurable UDP port (default 162)
- Log received traps at INFO level
- Add LOG_LEVEL env var for log verbosity control
- Add TRAP_PORT env var and CLI flag
- Update docker-compose with trap port mapping
2026-01-31 14:14:56 -06:00

41 lines
989 B
YAML

version: '3.8'
services:
towerops-agent:
image: registry.gitlab.com/towerops/towerops-agent:latest
container_name: towerops-agent
restart: unless-stopped
environment:
# Required: Your Towerops API URL
- TOWEROPS_API_URL=https://app.towerops.com
# Required: Agent authentication token (from Towerops web UI)
# Get this from: Organization > Agents > Create New Agent
- TOWEROPS_AGENT_TOKEN=your-agent-token-here
# Optional: Log level (error, warn, info, debug)
# Default: info
- LOG_LEVEL=info
# Optional: SNMP trap listener port
# Default: 162
- TRAP_PORT=162
ports:
# SNMP trap listener (UDP)
- "162:162/udp"
volumes:
# Persistent storage for metrics buffering
- ./data:/data
# Optional: Resource limits
deploy:
resources:
limits:
cpus: '0.5'
memory: 512M
reservations:
cpus: '0.1'
memory: 128M