No description
  • Go 97.9%
  • Makefile 1.3%
  • Dockerfile 0.8%
Find a file
Pierre-Olivier Mercier d4e64f6a2d
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
checker: implement ShareKey to mutualise pings across targets
A ping result depends only on the set of target addresses and the probe
count, never on which domain or service the addresses belong to. Implement
sdk.ObservationSharer so the host can collect a single ICMP probe per address
set (per user) instead of re-pinging once per record: with 1.2.3.4 present in
many domains under several A records, the same address was probed dozens of
times for identical data.

The share key sorts the resolved addresses and folds in the probe count;
evaluation thresholds (warningRTT, ...) are intentionally excluded as they
only affect how the shared observation is judged. Unresolvable inputs yield
an empty key so the host falls back to per-target caching.
2026-06-18 15:08:59 +09:00
checker checker: implement ShareKey to mutualise pings across targets 2026-06-18 15:08:59 +09:00
plugin Address publication review feedback 2026-04-26 18:05:47 +07:00
.drone-manifest.yml Add CI/CD pipeline 2026-05-10 19:17:59 +08:00
.drone.yml Add CI/CD pipeline 2026-05-10 19:17:59 +08:00
.gitignore Initial commit 2026-04-08 02:46:26 +07:00
Dockerfile docker: add HEALTHCHECK probing /health 2026-04-26 18:05:47 +07:00
go.mod checker: implement ShareKey to mutualise pings across targets 2026-06-18 15:08:59 +09:00
go.sum checker: implement ShareKey to mutualise pings across targets 2026-06-18 15:08:59 +09:00
LICENSE Address publication review feedback 2026-04-26 18:05:47 +07:00
main.go Migrate to checker-sdk-go v1.3.0 with standalone build tag 2026-04-26 10:19:13 +07:00
Makefile Migrate to checker-sdk-go v1.3.0 with standalone build tag 2026-04-26 10:19:13 +07:00
NOTICE Initial commit 2026-04-08 02:46:26 +07:00
README.md Include rules section 2026-04-30 08:49:43 +07:00

checker-ping

ICMP ping checker for happyDomain.

Checks reachability, round-trip time, and packet loss for IP addresses associated with a domain's services.

Usage

Standalone HTTP server

# Build and run
make
./checker-ping -listen :8080

# With privileged ICMP (requires CAP_NET_RAW or root)
./checker-ping -listen :8080 -privileged

The server exposes:

  • GET /health, health check
  • POST /collect, collect ping observations (happyDomain external checker protocol)

Docker

make docker
docker run -p 8080:8080 happydomain/checker-ping

# With privileged ICMP
docker run --cap-add NET_RAW -p 8080:8080 happydomain/checker-ping -privileged

happyDomain plugin

make plugin
# produces checker-ping.so, loadable by happyDomain as a Go plugin

The plugin exposes a NewCheckerPlugin symbol returning the checker definition and observation provider, which happyDomain registers in its global registries at load time.

Versioning

The binary, plugin, and Docker image embed a version string overridable at build time:

make CHECKER_VERSION=1.2.3
make plugin CHECKER_VERSION=1.2.3
make docker CHECKER_VERSION=1.2.3

happyDomain remote endpoint

Set the endpoint admin option for the ping checker to the URL of the running checker-ping server (e.g., http://checker-ping:8080). happyDomain will delegate observation collection to this endpoint.

Deployment

The /collect endpoint has no built-in authentication and will issue ICMP probes to whatever hostnames or IP addresses the caller supplies, including private (RFC 1918), loopback, link-local, and cloud metadata addresses (e.g. 169.254.169.254). It is meant to run on a trusted network, reachable only by the happyDomain instance that drives it. Restrict access via a reverse proxy with authentication, a network ACL, or by binding the listener to a private interface; do not expose it directly to the public internet.

Rules

Code Description Severity
ping.reachable Verifies every target replied to at least one ICMP probe. CRITICAL
ping.rtt Flags targets whose average round-trip time crosses the warning or critical threshold. CRITICAL
ping.ipv6_reachable Verifies that at least one IPv6 target replied to an ICMP probe. WARNING
ping.packet_loss Flags targets whose packet-loss ratio crosses the warning or critical threshold. CRITICAL

License & licensing roadmap

This project is currently licensed under the GNU Affero General Public License v3.0 (see LICENSE), because it still imports happydns.ServiceMessage and abstract.Server from the happyDomain server module (git.happydns.org/happyDomain/model and git.happydns.org/happyDomain/services/abstract), which are themselves distributed under AGPL-3.0 and a commercial license.

The core checker types (CheckerOptions, CheckerDefinition, ObservationProvider, CheckRule, …) have already been migrated to checker-sdk-go; only the service-message types remain on the AGPL side.

Planned relicensing: as soon as the remaining ServiceMessage / abstract.Server dependency has been removed (moved into a dedicated permissively licensed module), this project will be relicensed under the MIT License, in line with the rest of the happyDomain checker ecosystem (see checker-dummy for the target shape).

Contributors notice: by submitting a contribution to this repository, you accept that your contribution will be relicensed from AGPL-3.0 to MIT at the time of the relicensing described above. If you do not agree with this, please do not submit contributions until the relicensing has taken place.

The third-party Apache-2.0 attributions for checker-sdk-go are recorded in NOTICE and must accompany any binary or source redistribution of this project.