Descripción
Telegraf es un agente que nos permite recoger datos de máquinas con diferentes protocolos. Además nos permite recoger datos de la máquina en la que nos encontramos para monitorizar su rendimento.
Seguidamente inyectamos estos datos a InfluxDB v1 usando las credenciales y datos creados en nuestro vídeo:
Los ficheros de configuración y otros materiales están en:
https://industry40.systems/iot-gw/23
Canal de soporte en Telegram:
https://u.joor.net/i40sys
https://industry40.systems/iot-gw/23
Canal de soporte en Telegram:
https://u.joor.net/i40sys
Directorios
mkdir -p /docker-data/telegraf/etcConfiguración
/docker-data/telegraf/etc/telegraf.conf
file content
[global_tags]
# Configuration for telegraf agent
[agent]
interval = "10s"
debug = false
hostname = "iot-gw"
round_interval = true
flush_interval = "10s"
flush_jitter = "0s"
collection_jitter = "0s"
metric_batch_size = 1000
metric_buffer_limit = 10000
quiet = false
logfile = ""
omit_hostname = false
###############################################################################
# OUTPUTS #
###############################################################################
[[outputs.influxdb]]
urls = ["http://influx1:8086"]
database = "telegraf"
timeout = "0s"
username = "telegraf_w"
password = "%AfqgnSb5Ye?p!qd"
retention_policy = ""
###############################################################################
# INPUTS #
###############################################################################
[[inputs.cpu]]
percpu = true
totalcpu = true
collect_cpu_time = false
report_active = false
[[inputs.disk]]
ignore_fs = ["tmpfs", "devtmpfs", "devfs"]
[[inputs.io]]
[[inputs.mem]]
[[inputs.net]]
[[inputs.system]]
[[inputs.swap]]
[[inputs.netstat]]
[[inputs.processes]]
[[inputs.kernel]]/docker-data/telegraf/docker-compose.yml
version: '3.3'
services:
telegraf:
container_name: telegraf
restart: unless-stopped
image: telegraf
privileged: true
volumes:
- '/:/hostfs:ro'
- '/run/udev:/run/udev:ro'
- './etc/telegraf.conf:/etc/telegraf/telegraf.conf:ro'
- '/etc/localtime:/etc/localtime:ro'
environment:
- HOST_PROC=/hostfs/proc
- TZ=Europe/Madrid
networks:
- i40sys
networks:
i40sys:
external:
name: i40sys
