Lightweight fleet service health checker — zero dependencies
Project description
cocapn-health
Lightweight fleet service health checker. Probe, diagnose, report.
Version: 1.0.0 | Tests: 5 passing | Lines: ~300 | Deps: zero
Install
pip install cocapn-health
Usage
CLI
# Check all fleet services (default: markdown report)
cocapn-health
# JSON output for CI pipelines
cocapn-health --format json
# One-line summary for monitoring
cocapn-health --format oneline
# Watch mode: recheck every 30 seconds
cocapn-health --watch 30
# Exit with error code if any service down
cocapn-health --fail
# Custom host and ports
cocapn-health --host 147.224.38.131 --ports 4042,4043,4044,4045
Programmatic
from cocapn_health import HealthChecker, ServiceDef
checker = HealthChecker([
ServiceDef("MUD", "147.224.38.131", 4042, "/status"),
ServiceDef("PLATO", "147.224.38.131", 8847, "/rooms"),
])
results = checker.check_all()
print(checker.report(results, format="json"))
Fleet Services (built-in)
Checks 13 fleet services on 147.224.38.131:
| Service | Port | Path |
|---|---|---|
| MUD v3 | 4042 | /status |
| The Lock v2 | 4043 | / |
| Arena | 4044 | /stats |
| Grammar Engine | 4045 | /grammar |
| Dashboard | 4046 | / |
| Federated Nexus | 4047 | / |
| Grammar Compactor | 4055 | /status |
| Rate-Attention | 4056 | /streams |
| Skill Forge | 4057 | /status |
| PLATO Terminal | 4060 | / |
| PLATO Gate | 8847 | /rooms |
| PLATO Shell | 8848 | / |
| Matrix Bridge | 6168 | /status |
Architecture
cocapn_health/
├── src/cocapn_health/
│ └── __init__.py # HealthChecker + ServiceDef
└── tests/
└── test_health.py # 5 tests
Tests
cd cocapn-health
PYTHONPATH=src pytest tests/ -v
# 5 passed
Version
1.0.0
Fleet
Built by CCC (🦀) for the Cocapn Fleet.
Part of the Cocapn Fleet ecosystem.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cocapn_health-1.0.0.tar.gz.
File metadata
- Download URL: cocapn_health-1.0.0.tar.gz
- Upload date:
- Size: 5.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aa33edd85a166946ac6d9cec8ba23997f7a86f444279a52290268457027bbb57
|
|
| MD5 |
483e63a3b23c00fdfefd30f5ed82799e
|
|
| BLAKE2b-256 |
69343f3d45b97b65604faee963f341b596a38abca637f7b675ebbc8358533d42
|
File details
Details for the file cocapn_health-1.0.0-py3-none-any.whl.
File metadata
- Download URL: cocapn_health-1.0.0-py3-none-any.whl
- Upload date:
- Size: 5.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
635bc28475c1126c17267e35eaf9da9fa7279ef425d0992b3842325a6e70bd10
|
|
| MD5 |
235c505e1f527dd0676cece8837f5d0e
|
|
| BLAKE2b-256 |
f70f800eacb7dcf4de90deab1f4e1ea841791fe1effc657678fea2adf8bcd232
|