Saibotk
a178af1735
With the recent update to telegraf's container image it now runs under its own user and thus we need to change the permissions to make the config file accessible for the new user. See https://github.com/influxdata/influxdata-docker/pull/536
116 lines
4.2 KiB
YAML
116 lines
4.2 KiB
YAML
---
|
|
# Default variables for the telegraf role
|
|
|
|
# Infrastructure
|
|
# Ansible instructions to deploy the infrastructure
|
|
# Copyright (C) 2019-2020 Christoph (Sheogorath) Kern
|
|
# Copyright (C) 2020 Saibotk
|
|
#
|
|
# This program is free software: you can redistribute it and/or modify
|
|
# it under the terms of the GNU General Public License as published by
|
|
# the Free Software Foundation, version 3 of the License.
|
|
#
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU General Public License
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
# The install locations
|
|
telegraf_install_location: "/srv/telegraf"
|
|
telegraf_config_location: "{{ telegraf_install_location }}/conf"
|
|
|
|
# The telegraf/dockersocket version to use
|
|
# renovate: depName=docker.io/library/telegraf
|
|
telegraf_version: "1.20.3"
|
|
# renovate: depName=quay.io/sheogorath/docker-socket-proxy
|
|
telegraf_dockersocketproxy_version: "2.3"
|
|
# Changing this image may also require changing the UID / GID below,
|
|
# to set the correct permissions
|
|
telegraf_image_version: "{{ telegraf_version }}-alpine"
|
|
|
|
# Telegraf config user & group id
|
|
# This is used for the config folder that is mounted to the container
|
|
telegraf_config_uid: 100
|
|
telegraf_config_gid: 101
|
|
|
|
# The influxdb endpoints, telegraf should send data to
|
|
telegraf_influxdb_endpoints:
|
|
- influxdb.example.com
|
|
|
|
# The influxdb credentials
|
|
telegraf_influxdb_username: telegraf
|
|
telegraf_influxdb_password: "{{ lookup('passwordstore', telegraf_influxdb_endpoints[0] + '/db create=true length=42') }}"
|
|
|
|
# The retention policy settings (see https://github.com/influxdata/telegraf/blob/release-1.15/plugins/outputs/influxdb/README.md)
|
|
telegraf_influxdb_retention_policy: ""
|
|
telegraf_influxdb_retention_policy_tag: ""
|
|
|
|
# Telegraf agent configuration (see https://docs.influxdata.com/telegraf/v1.15/administration/configuration/)
|
|
telegraf_agent_hostname: "{{ ansible_fqdn }}"
|
|
telegraf_agent_interval: 10
|
|
telegraf_agent_debug: false
|
|
telegraf_agent_round_interval: true
|
|
telegraf_agent_flush_interval: 10
|
|
telegraf_agent_flush_jitter: 5
|
|
telegraf_agent_collection_jitter: 5
|
|
telegraf_agent_metric_batch_size: 2000
|
|
telegraf_agent_metric_buffer_limit: 1000000
|
|
telegraf_agent_omit_hostname: false
|
|
|
|
# The telegraf config's [global_tags] section (see https://docs.influxdata.com/telegraf/v1.15/administration/configuration/)
|
|
telegraf_global_tags: []
|
|
|
|
# The telegraf [[outputs.type]] sections (see https://docs.influxdata.com/telegraf/v1.15/administration/configuration/)
|
|
telegraf_output:
|
|
- type: influxdb
|
|
config:
|
|
- urls = ["https://{{ telegraf_influxdb_endpoints | join('","https://') }}"]
|
|
- database = "telegraf"
|
|
- timeout = "5s"
|
|
- username = "{{ telegraf_influxdb_username }}"
|
|
- password = "{{ telegraf_influxdb_password }}"
|
|
- retention_policy = "autogen"
|
|
- retention_policy_tag = "retention_policy"
|
|
|
|
# The telegraf input plugins that are enabled by default (see https://docs.influxdata.com/telegraf/v1.15/plugins/plugin-list/)
|
|
telegraf_plugins:
|
|
- plugin: internal
|
|
- plugin: cpu
|
|
config:
|
|
- percpu = true
|
|
- totalcpu = true
|
|
- collect_cpu_time = false
|
|
- report_active = false
|
|
- plugin: disk
|
|
config:
|
|
- ignore_fs = ["tmpfs", "devtmpfs", "devfs", "iso9660", "overlay", "aufs", "squashfs"]
|
|
- plugin: diskio
|
|
- plugin: kernel
|
|
- plugin: mem
|
|
- plugin: processes
|
|
- plugin: swap
|
|
- plugin: system
|
|
- plugin: docker
|
|
config:
|
|
- endpoint = "tcp://dockersocket:2375"
|
|
- container_names = []
|
|
- timeout = "5s"
|
|
- total = false
|
|
- plugin: docker_log
|
|
config:
|
|
- endpoint = "tcp://dockersocket:2375"
|
|
- source_tag = true
|
|
tags:
|
|
- retention_policy = "logs"
|
|
|
|
# Additional plugins, these will be added to the list of plugins above
|
|
telegraf_plugins_extra: []
|
|
|
|
# The telegraf processor plugins list (see https://docs.influxdata.com/telegraf/v1.15/plugins/plugin-list/)
|
|
# telegraf_processors = []
|
|
|
|
# Extra volumes that should be mounted inside the telegraf container
|
|
telegraf_extra_volumes: []
|