## Summary
- Add `plex_metrics` ansible role with textfile collector for Prometheus metrics
- Add Plex log collection to Alloy (forwards to Loki)
- Add Grafana dashboard for Plex monitoring (status, library counts, sessions, transcoding, logs)
## Metrics Collected
- `plex_up` - server health
- `plex_version_info` - server version
- `plex_sessions_total/playing/paused` - active sessions
- `plex_transcode_sessions_total/video/audio` - transcoding status
- `plex_library_items{library,type}` - library item counts
## Prerequisites
Plex token must be stored at `~/.plex-token` on indri (already done).
## Test plan
- [x] Dry-run passed (`mise run provision-indri -- --check --diff`)
- [ ] Apply changes (`mise run provision-indri`)
- [ ] Verify metrics: `ssh indri 'cat /opt/homebrew/var/node_exporter/textfile/plex.prom'`
- [ ] Verify logs in Grafana Explore: `{service="plex"}`
- [ ] Check Plex dashboard in Grafana
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Reviewed-on: https://forge.tail8d86e.ts.net/eblume/blumeops/pulls/13
20 lines
567 B
YAML
20 lines
567 B
YAML
---
|
|
# Plex metrics collection configuration
|
|
|
|
# Plex server URL
|
|
plex_url: "http://localhost:32400"
|
|
|
|
# Path to file containing Plex token (should have 600 permissions)
|
|
plex_token_file: "/Users/erichblume/.plex-token"
|
|
|
|
# Metrics collection interval in seconds
|
|
plex_metrics_interval: 60
|
|
|
|
# Output directory for prometheus textfile collector
|
|
plex_metrics_dir: /opt/homebrew/var/node_exporter/textfile
|
|
|
|
# Script installation path
|
|
plex_metrics_script: /Users/erichblume/bin/plex-metrics
|
|
|
|
# Log directory for metrics script output
|
|
plex_metrics_log_dir: /opt/homebrew/var/log
|