Skip to main content

Monitor Packager

Monitor Packager through its task API, logs, and Prometheus metrics.

Logs​

Packager logs to standard output. Follow them with docker logs, or ship them to a log system such as Grafana Loki.

Metrics​

Packager exposes metrics in Prometheus text format on the /metrics endpoint, port 4040 by default.

Vindral provides Grafana dashboards for Packager: one for the hosts that run Packager and one for a single stream. The In-Venue setup bundles them with Prometheus and Grafana. For other deployments, ask Vindral for the dashboard files.

Standalone scraping​

The API and metrics share [api].bind. With an API key configured, Prometheus must send it too. For example, using a mounted token file:

yaml
scrape_configs:
- job_name: packager
scrape_interval: 15s
static_configs:
- targets: ["packager-host:4040"]
authorization:
type: Bearer
credentials_file: /etc/prometheus/packager-api-key

Omit authorization only for an instance without an API key. The API serves plain HTTP, so the key travels in clear text: scrape over a private network or through a TLS-terminating proxy. packager-host must resolve from the scraper's own network/container.

Metric glossary​

Standalone Packager metrics use the vindral_packager_ prefix. Inspect the actual /metrics output from your release before adapting dashboards.

MetricType / unitUseful labels / interpretation
vindral_packager_sink_bytes_totalCounter, bytesid, name, index, type; output traffic per track.
vindral_packager_sink_packets_totalCounter, packetsSame labels; detects whether packets continue to leave.
vindral_packager_sink_restart_count_totalCounter, restartsid, name, type; repeated reconnections.
vindral_packager_source_interleave_buffer_msGauge, millisecondsid, name, index, codec; buffered duration.
vindral_packager_transcoder_encode_frame_budget_utilizationHistogram, ratioid, name, index, codec, configuration; encode processing time / frame duration.
vindral_packager_transcoder_decode_frame_budget_utilizationHistogram, ratioDecoder stage, including source/track labels.
vindral_packager_transcoder_convert_frame_budget_utilizationHistogram, ratioFilter/convert stage.

Device and protocol plugins add their own series:

PluginMetricsReference
NDI sourcevindral_packager_ndi_receive_*, vindral_packager_ndi_timeline_*NDI metrics
NDI sinkvindral_packager_ndi_send_connections, vindral_packager_ndi_send_dropped_frames_totalNDI metrics
DeckLink (decklink_sdk)vindral_packager_decklink_input_*, vindral_packager_decklink_output_*DeckLink metrics
Browser sourcevindral_packager_browser_*Browser source

Monitor SRT, RIST and RTSP tasks with the source and sink packet and byte counters.

Counters reset when a process restarts. Use rate or increase rather than subtracting arbitrary samples. Series may disappear when tasks/tracks are removed; missing data is different from a zero value.

Frame-budget queries​

A ratio of 1 means that processing one frame consumed one frame duration; it is not overall CPU utilization or end-to-end latency. Histograms export _bucket, _sum, and _count series. For average encode utilization per rendition:

promql
sum by (instance, id, index) (rate(vindral_packager_transcoder_encode_frame_budget_utilization_sum[5m]))
/
sum by (instance, id, index) (rate(vindral_packager_transcoder_encode_frame_budget_utilization_count[5m]))

Output bits/second per sink and restarts during the last ten minutes:

promql
8 * sum by (instance, id) (rate(vindral_packager_sink_bytes_total[1m]))
promql
sum by (instance, id) (increase(vindral_packager_sink_restart_count_total[10m]))

Investigate persistent budget pressure together with task states, output rate, and logs. Establish alert thresholds from the workload and expected stream schedule, including intentionally stopped tasks and absent inputs. See Performance and Troubleshooting.

Focused logs​

Use structured logs and a temporary module filter when diagnosing a pipeline:

toml
[logging]
kind = "json"
level = "info"
filter = "task=debug,ffmpeg=debug"

ffmpeg_log_level controls FFmpeg's own log emission; the module filter controls which tracing messages reach the output. Restore normal verbosity after collecting the relevant interval. Container logs are available with docker logs --since 10m CONTAINER_NAME.

Host dashboard​

The host dashboard shows every Packager on a server: source and sink bitrates, packet rates, CPU load, processing times per track, network throughput, sink restarts, and hardware encoder load.

Grafana host dashboard for Packager: source and sink bitrate, packet rates, CPU load and NVIDIA encoder loadGrafana host dashboard for Packager: source and sink bitrate, packet rates, CPU load and NVIDIA encoder load
Grafana host dashboard for Packager: decode, conversion and encode time per track, source and sink bitrate, sink restartsGrafana host dashboard for Packager: decode, conversion and encode time per track, source and sink bitrate, sink restarts
Grafana host dashboard for Packager: packet arrival timing, packets per second, internal queueing and dropped packetsGrafana host dashboard for Packager: packet arrival timing, packets per second, internal queueing and dropped packets

Stream dashboard​

The stream dashboard follows one stream: the host and task it runs on, decode, conversion and encode time per track, host load, and hardware encoder use.

Grafana stream dashboard for one Packager stream: decode, conversion and encode time, host CPU and memory, NVIDIA encoding and decoding loadGrafana stream dashboard for one Packager stream: decode, conversion and encode time, host CPU and memory, NVIDIA encoding and decoding load