sgnmon
Monitoring and metrics for SGN streaming pipelines
Prometheus metrics, health checks, and a live dashboard for SGN pipelines, attached without changing the pipeline graph.
Installation
pip install sgnmon
Quickstart
Any sgn application, no code changes:
$ sgnmon run --port 9090 -- sgn-cal --config config.yaml --model model.npz
[sgnmon] dashboard: http://localhost:9090/
A pipeline you build yourself:
from sgnmon import Monitor, MonitorServer
monitor = Monitor()
monitor.tap(pipeline) # observe every pad, no graph changes
with MonitorServer(monitor, port=9090):
pipeline.run(health=monitor) # lifecycle for /readyz and /healthz
From the shell:
$ sgnmon check http://localhost:9090 # health report; exit 0 / 1 / 2
$ sgnmon demo --port 9090 # a monitored example pipeline
What you get
| Attach | Taps at three observation points per element (frames produced, received, and consumed after the audioadapter), in-graph MonitorTransform/MonitorSink elements, or sgnmon run for zero-code attach |
| Metrics | /metrics: frame and gap counts, data/gap seconds, samples, latency histograms, per-pad execution time, freshness, EOS; opt-in process metrics; application metrics via MetricSpec/MetricsMixin |
| Windows | Rates, gap fractions and latencies over a 5 s ... 6 h trailing-window ladder on /status, for sub-minute resolution and consumers without PromQL |
| Health | Default checks (data freshness, throughput, latency drift) that self-pace their startup, opt-in latency/gap/EOS checks; /health and /health/<check> (503 on failure), /readyz and /healthz driven by the pipeline's own lifecycle |
| Dashboard | A self-contained live view of the pipeline graph with per-element rates, latencies, gap fractions and health; composed elements expand in place |
| Push | PushExporter POSTs the exposition to VictoriaMetrics (or any store taking it) on a timer, for anything Prometheus cannot scrape; lifecycle metrics make a hung run loop a one-term alert |
| CLI | sgnmon run, sgnmon check (plugin-friendly exit codes), sgnmon demo |
See the user guide: Attaching to Pipelines, Health Checks, The Monitoring Server, Metrics Reference.
Metadata
Release files for sgnmon 0.4.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 | |
|---|---|---|---|
| sgnmon-0.4.0.tar.gz | 166.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sgnmon-0.4.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 294.0 kB
Release files / sgnmon-0.4.0.tar.gz
| Download URL | sgnmon-0.4.0.tar.gz |
|---|---|
| Size | 166.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d892aaab5e91feb8309673c43a45f631e8bed97dc89e420502d63f1dcc543c62
|
|
BLAKE2b-256 checksum How to use checksums |
000a41c673da54dbe282f2efd42dbf2746e22c58b3a829a7e2c45967d17f730d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
Hatch/1.16.5 cpython/3.13.12 HTTPX/0.28.1
|
Release files / sgnmon-0.4.0-py3-none-any.whl
| Download URL | sgnmon-0.4.0-py3-none-any.whl |
|---|---|
| Size | 128.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cfd49156761a952047d0a16b3f314037377dede51ea6422c8f9f33a3c726a48e
|
|
BLAKE2b-256 checksum How to use checksums |
3abad2c2e2532684e7ea6154f444dc6c257b56b87126d4cd94604c88d02a294f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
Hatch/1.16.5 cpython/3.13.12 HTTPX/0.28.1
|