Collect SMART metrics for disks

This commit is contained in:
Jake Howard 2021-03-05 20:50:08 +00:00
parent 6b95b75fc2
commit d43d3433fa
Signed by: jake
GPG key ID: 57AFB45680EDD477
2 changed files with 9 additions and 0 deletions

View file

@ -96,3 +96,6 @@
[[inputs.ping]]
urls = ["192.168.1.1", "1.1.1.1"]
ping_interval = 60.0
[[inputs.smart]]
use_sudo = true

View file

@ -2,3 +2,9 @@
import_role:
name: rossmcdonald.telegraf
become: true
- name: Let telegraf do smart stats
lineinfile:
path: /etc/sudoers
line: "{{ telegraf_runas_user }} ALL=(ALL) NOPASSWD: /usr/sbin/smartctl"
become: true