- Add node_exporter ansible role to enable textfile collector - Add transmission_metrics role with script and LaunchAgent - Collects metrics every 60s via transmission RPC - Writes to /opt/homebrew/var/node_exporter/textfile/transmission.prom - Update grafana role to provision dashboards from files - Add transmission.json dashboard with: - Status indicator, torrent counts - Transfer speeds, cumulative stats - Time series graphs Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
20 lines
728 B
YAML
20 lines
728 B
YAML
---
|
|
- name: Deploy transmission metrics collection script
|
|
ansible.builtin.template:
|
|
src: transmission-metrics.sh.j2
|
|
dest: "{{ transmission_metrics_script }}"
|
|
mode: '0755'
|
|
notify: reload transmission-metrics
|
|
|
|
- name: Deploy transmission-metrics LaunchAgent plist
|
|
ansible.builtin.template:
|
|
src: transmission-metrics.plist.j2
|
|
dest: ~/Library/LaunchAgents/mcquack.eblume.transmission-metrics.plist
|
|
mode: '0644'
|
|
notify: reload transmission-metrics
|
|
|
|
- name: Ensure transmission-metrics LaunchAgent is loaded
|
|
ansible.builtin.command: launchctl load ~/Library/LaunchAgents/mcquack.eblume.transmission-metrics.plist
|
|
register: launchctl_load
|
|
changed_when: launchctl_load.rc == 0
|
|
failed_when: false
|