Skip to main content

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) of max_latency
  • CRITICAL — latency at/past max_latency, or no message within max_latency plus 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

arrakis_monitor-0.1.2.tar.gz (177.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

arrakis_monitor-0.1.2-py3-none-any.whl (38.3 kB view details)

Uploaded Python 3

File details

Details for the file arrakis_monitor-0.1.2.tar.gz.

File metadata

  • Download URL: arrakis_monitor-0.1.2.tar.gz
  • Upload date:
  • Size: 177.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Hatch/1.16.5 cpython/3.13.12 HTTPX/0.28.1

File hashes

Hashes for arrakis_monitor-0.1.2.tar.gz
Algorithm Hash digest
SHA256 90ac4d13850ccede86a76f71b086c2aa54c8966aaeaf010bac40f17774865230
MD5 7e3647925038713125a5a3e0de1d64da
BLAKE2b-256 2fd90b788124c0c90974d707a3fade275c12b483e1774fca09ad0c7b1342c45e

See more details on using hashes here.

File details

Details for the file arrakis_monitor-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: arrakis_monitor-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 38.3 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

Hashes for arrakis_monitor-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 670d63e214dc943bfe8a4fac36627ceb3042a05096b3da36587bcb822633c198
MD5 a4d5d322bf4ce0ef3697fdb998cd4b64
BLAKE2b-256 cd4711b4d64d02b5e440845b8822a7a5e14c450731e81b85f15de2361ac52491

See more details on using hashes here.

Release history Release notifications | RSS feed

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

0.1.3

2 files

This release

0.1.2 This release

2 files

0.1.1

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page