Commit graph

11 commits

Author SHA1 Message Date
98d1bbbb21
structured logging 2026-01-31 15:40:42 -06:00
b8aecf0a55
more tests 2026-01-31 15:26:36 -06:00
4cd357777f
Add TRAP_ENABLED env var to conditionally enable trap listener 2026-01-31 14:39:24 -06:00
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
380beaca1a
Agent overhaul with zero persistence 2026-01-30 15:50:20 -06:00
4269b246a7
remove sample config 2026-01-16 17:39:22 -06:00
368ca5a0a6
Add DOCKER_API_VERSION to Watchtower configuration
Prevents 'client version too old' errors when Watchtower tries to
communicate with modern Docker daemons that require API version 1.44+
2026-01-16 17:39:10 -06:00
efa8404ea6
rewrite with much simpler runtime 2026-01-16 17:27:10 -06:00
824f4388eb
Add automatic self-update capability to agent
The agent now checks for updates every hour and automatically updates
itself when a new version is available on Docker Hub.

Features:
- Periodic update checks (hourly via scheduler)
- Automatic Docker image pull when update available
- Graceful exit and restart with new version
- Non-blocking, runs in background task
- Requires Docker socket mount for self-update

Changes:
- Add UpdateInfo struct and get_update_info() function
- Add perform_self_update() to pull new image and restart
- Add update check ticker to scheduler (hourly)
- Include docker-cli in Dockerfile runtime stage
- Update docker-compose.example.yml with socket mount
- Update README and CLAUDE.md with auto-update docs

The agent will log update status:
- "Already running latest version" - no action
- "Performing self-update: X -> Y" - pulling new image
- "Exiting to allow restart with new version" - restarting

Requires:
- Docker socket mounted: /var/run/docker.sock:/var/run/docker.sock
- restart: unless-stopped in docker-compose (to restart after exit)
2026-01-14 16:50:32 -06:00
953d044c9b
change build dest 2026-01-09 17:02:03 -06:00
5263175182
build docker image in ci 2026-01-09 13:32:11 -06:00