Skip to content

Feature/healthcheck#8

Merged
krakenhavoc merged 2 commits intomainfrom
feature/healthcheck
Mar 26, 2026
Merged

Feature/healthcheck#8
krakenhavoc merged 2 commits intomainfrom
feature/healthcheck

Conversation

@krakenhavoc
Copy link
Contributor

This pull request introduces significant enhancements and refactoring to support a new "connected" mode for the probe, clarify configuration, and improve deployment and operational flexibility. The changes unify and clarify the probe modes ("standalone", "connected", "hosted"), update configuration and validation logic, improve Docker and healthcheck support, and add remote endpoint polling for dynamic configuration in connected/hosted modes.

Configuration and Mode Refactoring

  • Replaces the old "self-hosted" mode with "standalone" and introduces a new "connected" mode, updating all defaults, validation, and documentation to reflect these changes. Validation logic is now mode-aware, enforcing the correct requirements for each mode (e.g., API key presence, endpoint requirements, interval bounds) (internal/config/config.go, .env.example, internal/config/config_test.go, internal/health/health_test.go, internal/reporter/reporter_test.go) [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16].

Scheduler and Remote Endpoint Polling

  • Adds support for dynamic endpoint reloading in "connected" and "hosted" modes by polling the API every 60 seconds and triggering immediate scans if the endpoint list changes, ensuring the probe always monitors the latest endpoints from the dashboard (internal/scheduler/scheduler.go) [1] [2].

Deployment and Healthcheck Improvements

  • Updates the Dockerfile and docker-compose.yaml to simplify deployment: uses .env for configuration, sets up persistent state directories with correct permissions, exposes the health endpoint, and adds a container healthcheck using a new --healthcheck CLI flag (Dockerfile, docker-compose.yaml, cmd/probe/main.go) [1] [2] [3] [4] [5].

CLI and Logging Enhancements

  • Adds a --healthcheck CLI flag to allow scripts and Docker to check probe health easily, and clarifies logging for standalone mode operation (cmd/probe/main.go) [1] [2] [3] [4].

Test Suite Updates

  • Updates and extends the test suite to cover new validation logic, mode handling, and configuration scenarios, ensuring robust behavior across all supported modes (internal/config/config_test.go, internal/health/health_test.go, internal/reporter/reporter_test.go) [1] [2] [3] [4] [5] [6].

These changes collectively make the probe easier to configure, safer to deploy, and more flexible for both local and managed/connected use cases.

@krakenhavoc krakenhavoc merged commit 9926951 into main Mar 26, 2026
9 checks passed
@krakenhavoc krakenhavoc deleted the feature/healthcheck branch March 26, 2026 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant