master
Newer devenv versions require git-hooks.nix to be declared as an explicit input when devenv.nix uses `git-hooks.hooks`.
Vinyl Exporter
Prometheus exporter for Vinyl. It exposes the regular vinylstat -j counters and adds HLS playlist viewer metrics from vinyllog.
Viewer Counting
The exporter treats playlist requests as viewer activity. A viewer remains active until --hls.viewer-ttl elapses without another matching playlist request.
Viewer identity is resolved in this order:
- configured query parameters
- configured cookie names
- client IP, unless
--hls.identity.ip-fallback=false
Raw viewer IDs are only kept in memory and are never emitted as Prometheus labels.
When Vinyl runs behind a reverse proxy, configure the proxy address with
--hls.identity.trusted-proxy. If the Vinyl peer address is trusted, IP fallback
uses the first untrusted address from X-Forwarded-For; otherwise the header is
ignored.
Example
vinyl_exporter \
--hls.path-prefix=/hls/ \
--hls.stream-components=1 \
--hls.identity.query-param=viewer \
--hls.identity.cookie=viewer_id \
--hls.identity.trusted-proxy=127.0.0.1
For /hls/channel-a/index.m3u8?viewer=abc, the stream label is channel-a.
Metrics
vinyl_up: lastvinylstatscrape status.vinyl_*: global Vinyl metrics converted fromvinylstat -j.vinyl_hls_active_viewers{stream}: active playlist viewers within the TTL.vinyl_hls_playlist_requests_total{stream,identity_source,status_class}: playlist request counter.vinyl_hls_identity_missing_total{stream}: playlist requests without any enabled identity.vinyl_hls_log_parse_errors_total: log parser read errors.
Description
Languages
Go
87.6%
Nix
12.4%