2019-10-06 20:55:56 +00:00
|
|
|
---
|
|
|
|
# Server/Telegraf: Install and Setup Telegraf Monitoring
|
|
|
|
|
2020-03-08 15:41:55 +00:00
|
|
|
# Install
|
2019-10-06 20:55:56 +00:00
|
|
|
- name: telegraf - Install telegraf
|
2020-03-08 15:41:55 +00:00
|
|
|
include_tasks: "{{ item }}"
|
|
|
|
with_first_found:
|
|
|
|
- "telegraf-{{ ansible_distribution }}.{{ ansible_distribution_release }}.yml"
|
|
|
|
- "telegraf-{{ ansible_distribution }}.yml"
|
|
|
|
- "telegraf-{{ ansible_os_family }}.yml"
|
2019-10-06 20:55:56 +00:00
|
|
|
|
2020-03-08 15:41:55 +00:00
|
|
|
# Configure
|
2019-10-06 20:55:56 +00:00
|
|
|
- name: telegraf - Copy telegraf config
|
|
|
|
become: yes
|
|
|
|
template:
|
|
|
|
src: "{{ role_path }}/templates/telegraf.conf"
|
|
|
|
dest: /etc/telegraf/telegraf.conf
|
|
|
|
notify:
|
2019-11-12 20:34:35 +00:00
|
|
|
- Enable and restart telegraf
|