chap-checker
A small command-line health-check and alerting tool for DHIS2 instances that
integrate with chap-core via a DHIS2 route, and for
Open Climate Service
deployments (kind = "ocs"). Cron-friendly, with optional
Slack / generic-webhook alerts on status transitions, a long-running
daemon that exposes a browser dashboard (designed for a TV / kiosk) and a
JSON state API, and a Textual TUI for the operator-at-a-desk view (locally
or pointed at a remote daemon).
Documentation: https://dhis2-chap.github.io/chap-checker
Install
# One-shot run without installing (no PATH pollution):
uvx chap-checker --version
uvx chap-checker verify --url https://dhis2.example.com --token-env DHIS2_TOKEN
# Persistent install into uv's isolated tool environment:
uv tool install chap-checker
chap-checker --version
# Upgrade to the latest release later:
uv tool upgrade chap-checker
# Or, if you're embedding into another uv project:
uv add chap-checker
Quick start
The fastest path is chap-checker init, which drops a working chap-checker.toml (chmod 600) pointed at the public DHIS2 demo so you can verify the tool runs before adding your own instances:
chap-checker init
chap-checker verify # OK on the play demo
Then edit chap-checker.toml. A typical config:
[instances.prod]
url = "https://dhis2.example.com"
username = "ops"
password_env = "PROD_PASS"
alerts = ["slack", "webhook"]
[alerts.slack]
webhook_url_env = "SLACK_WEBHOOK_URL"
[alerts.webhook]
url_env = "INCIDENT_BUS_URL"
headers = { "Authorization" = "Bearer ..." }
Discover the alert transports and copy-paste their TOML:
chap-checker alerts list # registry of available alerters with per-field comments
chap-checker alerts test --kind both # fire a synthetic OK->FAIL + FAIL->OK pair
Ad-hoc verify against a single instance (no config needed):
# With a DHIS2 Personal Access Token (recommended on modern servers):
export PROD_TOKEN=...
chap-checker verify --url https://dhis2.example.com --token-env PROD_TOKEN
# Or with a password (Basic auth) read from a named env var:
export PROD_PASSWORD=...
chap-checker verify --url https://dhis2.example.com --username admin --password-env PROD_PASSWORD
--password / --token inline still works but is discouraged — the value lands in shell history and ps output. Omit both and you'll be prompted on a TTY. See chap-checker.toml.example for the full config template.
Surfaces
chap-checker tui # Textual TUI: operator-at-a-desk view, in a terminal
chap-checker serve # long-running daemon: browser dashboard at / + JSON state at /api/state
chap-checker tui --connect http://daemon-host:8765 # TUI as a thin client of a remote `serve`
Pair them: run chap-checker serve somewhere persistent (a small VM, the TV machine itself, systemd-supervised — see the server guide for the unit file). Pin a kiosk browser at the URL on the TV; operators at desks run chap-checker tui locally or chap-checker tui --connect http://daemon:8765 for the same numbers without spinning up their own check loop. Alerts fire from one place.
Built-in checks
Four namespaces — http_* is a transport-level reachability probe for
every instance kind, dhis2_* probes DHIS2 itself, dhis2_chap_* probes
chap-core through the DHIS2 route, and ocs_* probes an Open Climate
Service deployment. An instance only runs the checks for its kind. Each
tile in the dashboard, each row in chap-checker checks list, each entry in
the JSON output:
http_2xx— unauthenticatedGET <base_url>, asserts the final response is 2xx (follows redirects)dhis2_ping—/api/medhis2_system_info—/api/system/infodhis2_chap_route—/api/routes?filter=code:eq:chapdhis2_chap_ping—/api/routes/chap/run/healthdhis2_chap_system_info—/api/routes/chap/run/system/infodhis2_chap_modeling_app—/api/apps(matched byapp_hub_id)dhis2_chap_climate_app—/api/apps(matched byapp_hub_id)ocs_health—/health(liveness only)ocs_info—/info+/(version and openEO capabilities)
Full reference + endpoint details: Checks.
Development
make install
make lint # ruff + mypy + pyright
make test
make docs # serve docs locally
See Development for repo layout and house rules.
Contributing
PRs welcome — start with CONTRIBUTING.md. The development guide on the docs site has the long version: https://dhis2-chap.github.io/chap-checker/guides/development/.
For security issues, see SECURITY.md — please don't open a public issue.
Contributors: github.com/dhis2-chap/chap-checker/graphs/contributors.
License
Metadata
Release files for chap-checker 0.10.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| chap_checker-0.10.0.tar.gz | 814.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| chap_checker-0.10.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.7 MB
Release files / chap_checker-0.10.0.tar.gz
| Download URL | chap_checker-0.10.0.tar.gz |
|---|---|
| Size | 814.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9f65074b9b602f1317149968cbfee68de04d77ff4cde97c3716033a372230487
|
|
BLAKE2b-256 checksum How to use checksums |
1899a83a26f03d73d1d09fc0ba2affc8029412539d42bf3c229cb51a100a187b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 1, 2026.
Transparency logRelease files / chap_checker-0.10.0-py3-none-any.whl
| Download URL | chap_checker-0.10.0-py3-none-any.whl |
|---|---|
| Size | 838.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b68779c3c87735cfaf24fe298f56419b8fc4733ed69eb7729ad3b90291516ba9
|
|
BLAKE2b-256 checksum How to use checksums |
51e87ffe8e3b40e92f1f828e5604022acef140c3f9881a2babec763941b9d546
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 1, 2026.
Transparency log