- 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>
22 lines
687 B
YAML
22 lines
687 B
YAML
---
|
|
# Note: node_exporter is installed via homebrew manually.
|
|
# This role manages the args file to enable textfile collector.
|
|
|
|
- name: Create textfile collector directory
|
|
ansible.builtin.file:
|
|
path: "{{ node_exporter_textfile_dir }}"
|
|
state: directory
|
|
mode: '0755'
|
|
|
|
- name: Configure node_exporter args
|
|
ansible.builtin.template:
|
|
src: node_exporter.args.j2
|
|
dest: /opt/homebrew/etc/node_exporter.args
|
|
mode: '0644'
|
|
notify: restart node_exporter
|
|
|
|
- name: Ensure node_exporter service is started
|
|
ansible.builtin.command: brew services start node_exporter
|
|
register: brew_start
|
|
changed_when: "'Successfully started' in brew_start.stdout"
|
|
failed_when: false
|