Agent was crashing with segmentation fault (exit code 139) when attempting ICMP ping health checks. The surge-ping library requires CAP_NET_RAW capability to create raw sockets for ICMP. Changes: - Added cap_add: NET_RAW to docker-compose.example.yml - Updated README docker-compose example - Added troubleshooting section for exit code 139 crashes Without this capability, the agent crashes immediately after successful ping execution when the surge-ping library attempts to clean up raw socket resources.
30 lines
800 B
YAML
30 lines
800 B
YAML
services:
|
|
towerops-agent:
|
|
image: ghcr.io/towerops-app/towerops-agent:latest
|
|
container_name: towerops-agent
|
|
restart: unless-stopped
|
|
|
|
# Required for ICMP ping health checks
|
|
cap_add:
|
|
- NET_RAW
|
|
|
|
environment:
|
|
# 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: Enable SNMP trap listener
|
|
# Default: false
|
|
- TRAP_ENABLED=true
|
|
|
|
# Optional: SNMP trap listener port (only used if TRAP_ENABLED=true)
|
|
# Default: 162
|
|
- TRAP_PORT=162
|
|
|
|
ports:
|
|
# SNMP trap listener (UDP)
|
|
- "162:162/udp"
|