jamescarr.telegraf
Ansible Role: Telegraf
Installs Telegraf on Debian/Ubuntu systems.
Requirements
No special requirements.
Role Variables
You can find the available variables below, along with their default settings (check defaults/main.yml
).
Dependencies
None.
Example Playbook
Here is an example playbook that uses stats from InfluxDB as input and sends output to InfluxDB.
- hosts: utility
vars_files:
- vars/main.yml
roles:
- jamescarr.telegraf
telegraf_render_config: true
plugins:
outputs:
influxdb:
urls:
- 'http://localhost:8086'
database: telegraf
precision: s
retention_policy: default
write_consistency: any
timeout: 5s
inputs:
influxdb:
urls: ['http://localhost:8086/debug/vars']
This role also includes a module to add standalone input/output configurations that will be found in /etc/telegraf/conf.d
.
- name: Add file input
telegraf_config:
name: mcrouter
plugins:
input:
tail:
name_prefix: mcrouter_log
from_beginning: true
data_format: value
data_type: string
files:
- /var/log/mcrouter/mcrouter.log
You can also provide a template for the configuration file if needed.
- name: Add file input
telegraf_config:
name: mcrouter
template: mcrouter.conf.j2
TODO: More examples with different inputs.
License
MIT / BSD
Author Information
This role was created in 2016 by James Carr.
Informazioni sul progetto
An ansible role to install and configure Telegraf (https://influxdata.com/time-series-platform/telegraf/)
Installa
ansible-galaxy install jamescarr.telegraf
Licenza
Unknown
Download
17.5k
Proprietario
Engineering Leader, Meditator and Bourbon Enthusiast.
Currently on the Pro Leisure Circuit.