Commit Graph

8 Commits

Author SHA1 Message Date
brngates98
9cfb732c11 Replace Python endpoint-discovery with --discover flag (replaces #936)
- Add --discover and --discover-output to unpoller; uses first unifi
  controller from config to probe known API endpoints and write a
  shareable markdown report.
- Add Discoverer interface and RunDiscover(); inputunifi implements
  Discoverer via unifi.DiscoverEndpoints.
- Remove tools/endpoint-discovery/ (Python/Playwright).
- Add docs/PR_936_REPLACEMENT.md. .gitignore: test config and report.

Requires unpoller/unifi with DiscoverEndpoints (replace in go.mod until
unifi release).
2026-01-30 20:17:00 -05:00
aharper343
f7d488a887 Lint and format cleanup 2025-12-24 12:09:19 -05:00
Cody Lee
832334655c Fix health check port binding conflict (issue #892)
The Docker health check was attempting to bind to ports already in use by
the running application, causing "address already in use" errors. This fix
adds a health check mode that skips network binding operations while still
validating output configuration (listen addresses, paths, etc.).

Changes:
- Add health check mode flag in pkg/poller/outputs.go
- Update prometheus and webserver DebugOutput() to skip port binding in health check mode
- Maintain full configuration validation without network conflicts

Fixes #892

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-09 08:11:21 -06:00
Cody Lee
b960695f3b Add Docker health check support
Implements #406 by adding a --health CLI flag and HEALTHCHECK instruction
to the Dockerfile. This allows Docker and container orchestration platforms
to monitor container health automatically.

Changes:
- Added --health flag that validates configuration and plugin connectivity
- Implemented HealthCheck() method in pkg/poller/commands.go
- Updated Dockerfile with HEALTHCHECK instruction (30s interval, 10s timeout)
- Updated MANUAL.md with --health flag documentation
- Added health check documentation to Docker README
- Added comments to docker-compose examples about built-in health check

The health check:
- Validates configuration file is found and parseable
- Ensures at least one input and one enabled output are configured
- Performs basic validation on enabled outputs
- Returns exit code 0 (healthy) or 1 (unhealthy)
- Runs silently for Docker compatibility

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-08 13:09:10 -06:00
Cody Lee
6f4384c18d fix linting 2025-12-03 11:40:21 -06:00
Cody Lee
ffb8579369 add integration test guard;
datadog integration test works

influx package tests

update unifi version

golanglint-ci and address *all* issues.

all tests pass

bump unifi version
2023-07-31 14:40:33 -05:00
Cody Lee
3768c53512 CLI works 2022-12-22 18:16:43 -06:00
Cody Lee
1900e69d7a all to pkg 2022-12-02 20:48:01 -05:00