arrakis-monitor
HTTP health sidecar for Arrakis Flight servers.
Overview
arrakis-monitor runs alongside each Arrakis server and exposes its health
status over HTTP, allowing standard monitoring tools (Nagios/Icinga via NRPE +
check_http) to check gRPC Flight servers without needing a gRPC-native plugin.
Installation
pip install arrakis-monitor
Usage
# basic health sidecar
arrakis-monitor --server grpc://localhost:31206
# with scope map domain validation
arrakis-monitor --server grpc://localhost:31206 --expect-domains H1,L1,V1
# with publisher liveliness/latency checks (online servers)
arrakis-monitor --server grpc://localhost:31206 --check-publishers
# custom bind address
arrakis-monitor --server grpc://localhost:31206 --host 127.0.0.1 --port 9090
Endpoints
| Endpoint | Description |
|---|---|
GET / |
Show server configuration |
GET /health |
Run a health check (calls server_info()) |
GET /scope-map |
Run a scope map check (calls scope_map()) |
GET /publishers |
Probe every publisher in the scope map (--check-publishers) |
GET /publishers/{publisher} |
Probe a single publisher (--check-publishers) |
Health and scope-map endpoints return JSON with an HTTP status code:
- 200 — OK or WARNING
- 503 — CRITICAL (server unreachable or scope map empty)
- 500 — UNKNOWN (unexpected error)
Response format
Both check endpoints include a latency_s field measuring the gRPC call
round-trip time in seconds:
{
"status": "ok",
"message": "Server 0.12.0 (kafka)",
"version": "0.12.0",
"backend": "kafka",
"domains": ["H1", "L1"],
"capabilities": ["find", "count", "describe", "stream"],
"latency_s": 0.042
}
Publisher checks
On online (Kafka-backed) servers, --check-publishers enables
per-publisher liveliness and latency monitoring. For each publisher
tagged in the server's scope map, the sidecar consumes the publisher's
metadata topic from the local broker to select a surrogate channel,
then probes the data topic for that channel's partition, waiting for a
fresh message. The block-time latency of the freshest record batch is
compared against the max_latency advertised in the channel metadata:
- OK — fresh data arrived within the latency budget
- WARNING — latency within
--publisher-warn-margin(default 1 s) ofmax_latency - CRITICAL — latency at/past
max_latency, or no message withinmax_latencyplus one block stride (reported with the age of the last retained message)
/publishers probes every publisher concurrently and reports the
worst status; /publishers/{publisher} probes one, for fine-grained
per-publisher alerting. Surrogate resolution is cached per publisher
(--metadata-ttl, default 600 s), and check results are cached
briefly (--probe-cache-ttl, default 60 s) so aggregate and
per-publisher checks polling around the same time share one probe —
a shared result carries its age in a cached_age_s field.
Options:
| Flag | Default | Description |
|---|---|---|
--check-publishers |
off | Enable publisher checks |
--bootstrap-servers |
localhost:9092 |
Kafka bootstrap server(s) |
--publisher-warn-margin |
1 |
Warn within this many seconds of max_latency |
--publisher-max-latency |
30 |
Fallback budget when metadata has no max_latency |
--probe-timeout |
30 |
Cap on waiting for a data message per probe |
--metadata-ttl |
600 |
Seconds to cache surrogate resolution |
--probe-cache-ttl |
60 |
Seconds to serve cached probe results (0 disables) |
--surrogate PUB=CHANNEL |
auto | Explicit surrogate channel (repeatable) |
{
"status": "ok",
"message": "Publisher 'H1_lldd' live (latency 3.2s)",
"publisher": "H1_lldd",
"channel": "H1:AOS-ETMX_BAFFLEPD_1_DC_POWER",
"replay_id": null,
"max_latency_s": 12.0,
"warn_latency_s": 11.0,
"latency_s": 3.2,
"transport_latency_s": 0.05,
"block_time_gps": 1400000000.0
}
NRPE Integration
Each Arrakis host runs the sidecar locally, and NRPE executes check_http
against localhost:8080. The -w and -c flags set warning and critical
thresholds on the HTTP response time (in seconds):
# health check (warn at 2s, critical at 5s)
command[check_arrakis]=/usr/lib/nagios/plugins/check_http -H localhost -p 8080 -u /health -w 2 -c 5
# scope map validation (info servers only)
command[check_arrakis_scope_map]=/usr/lib/nagios/plugins/check_http -H localhost -p 8080 -u /scope-map -w 2 -c 5
# publisher liveliness/latency (online servers with --check-publishers);
# probes wait for live data, so allow more response time than the other checks
command[check_arrakis_publishers]=/usr/lib/nagios/plugins/check_http -H localhost -p 8080 -u /publishers -w 10 -c 30 -t 40
For per-publisher alerting, point check_http at
/publishers/<publisher-id> with one command per publisher.
See examples/nrpe/ for per-host configuration examples for all sites.
Resources
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 arrakis_monitor-0.1.3.tar.gz.
File metadata
- Download URL: arrakis_monitor-0.1.3.tar.gz
- Upload date:
- Size: 178.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
Hatch/1.16.5 cpython/3.13.12 HTTPX/0.28.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
272015b951b19f4652bdef53fdccbae0eb67ac410899e1597ec9de2395d4ea20
|
|
| MD5 |
6c7a5486fad4933d64f039b53131f5ee
|
|
| BLAKE2b-256 |
d617fdc486d000099b5ebefb824a7a82940a16143a36e84ff6153fec4f884304
|
File details
Details for the file arrakis_monitor-0.1.3-py3-none-any.whl.
File metadata
- Download URL: arrakis_monitor-0.1.3-py3-none-any.whl
- Upload date:
- Size: 38.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
Hatch/1.16.5 cpython/3.13.12 HTTPX/0.28.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ba71ebe6334313c725a97c8a438a6def783527598fc0e046dcea73aab8930226
|
|
| MD5 |
89b43d076a59956dda9401c20b8f8026
|
|
| BLAKE2b-256 |
c70bcfb44e0e548324ce9e27797bbbb1d15fcab14b2b73f1398566b5b1a7624c
|