Have telegraf monitor systemd units
This commit is contained in:
parent
1982326553
commit
af2dc2332d
@ -17,4 +17,12 @@
|
|||||||
apt:
|
apt:
|
||||||
name:
|
name:
|
||||||
- telegraf
|
- telegraf
|
||||||
|
- name: Copy configs
|
||||||
|
template:
|
||||||
|
src: "{{ item.src }}"
|
||||||
|
dest: "/etc/telegraf/telegraf.d/{{ item.dest }}"
|
||||||
|
mode: "0644"
|
||||||
|
loop:
|
||||||
|
- { src: "50-ansible.conf", dest: "50-ansible.conf" }
|
||||||
|
notify: restart telegraf
|
||||||
become: yes
|
become: yes
|
||||||
|
3
roles/telegraf/templates/50-ansible.conf
Normal file
3
roles/telegraf/templates/50-ansible.conf
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
# This file managed via Ansible
|
||||||
|
[[inputs.systemd_units]]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user