Add Plex Media Server observability (#13)
## 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
This commit is contained in:
parent
2a1359a3b6
commit
ae1513e7e9
10 changed files with 919 additions and 0 deletions
20
ansible/roles/plex_metrics/defaults/main.yml
Normal file
20
ansible/roles/plex_metrics/defaults/main.yml
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
---
|
||||
# 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue