Telegraf is a self-hosted time-series database. This role helps you to set up Telegraf:
- with everything run in Docker containers
- powered by the official Telegraf container image
- A installed and running InfluxDB.
To configure and install Telegraf on your own server(s), you should use a playbook like Mother of all self-hosting or write your own.
This role depends on a InfluxDB configuring Telegraf. You need to obtain the influx token and config link in the InfluxDB. In your browser, visit the InfluxDB and go to Load Data -> Telegraf. There you need to add a Telegraf configuration. You can now obtain these values from the setup instructions and paste them here.
telegraf_enabled: true
telegraf_influx_token: SUPERSECRETTOKEN
telegraf_config_link: https://influxdb.example.com/api/v2/telegrafs/01234569
In your InfluxDB configure the Telegraf plugins as you like.
- Github issues: mother-of-all-self-hosting/ansible-role-telegraf/issues
You can optionally install pre-commit so that simple mistakes are checked and noticed before changes are pushed to a remote branch. See .pre-commit-config.yaml
for which hooks are to be executed.
See this section on the official documentation for usage.