Upgrade to Pro — share decks privately, control downloads, hide ads and more …

The Telegraf Toolbelt (InfluxDays SF, 2019)

David McKay
October 02, 2019

The Telegraf Toolbelt (InfluxDays SF, 2019)

Telegraf is an agent for collecting, processing, aggregating, and writing metrics. With over 200 plugins, Telegraf can fetch metrics from a variety of sources, allowing you to build aggregations and write those metrics to InfluxDB, Prometheus, Kafka, and more.

In this talk, we will take a look at some of the lesser known, but awesome, plugins that are often overlooked; as well as how to use Telegraf for monitoring of Cloud Native systems.

David McKay

October 02, 2019
Tweet

More Decks by David McKay

Other Decks in Technology

Transcript

  1. David McKay Developer Advocate at InfluxData @rawkode Scottish Has 9

    Pets Esoteric Programming Languages ☸ Kubernetes Release Team
  2. © 2019 InfluxData. All rights reserved. 4 Over 200 Plugins

    ➔ 169 Inputs ➔ 35 Outputs ➔ 15 Processors ➔ 14 Parsers ➔ 9 Serializers ➔ 8 Aggregators
  3. © 2019 InfluxData. All rights reserved. 5 V1.10 (May) ➔

    Inputs ◆ Google Cloud PubSub ◆ Kinesis Consumer ◆ Kube Inventory ◆ Neptune Apex ◆ Nginx Upstream Checks ◆ Multifile ◆ Stack Driver ➔ Outputs ◆ Google Cloud PubSub ➔ Serializers ◆ Nowmetric ◆ Carbon2
  4. © 2019 InfluxData. All rights reserved. 6 V1.11 (June) ➔

    Inputs ◆ bind9 ◆ Cisco GNMI ◆ Cisco MDT ◆ ECS & Fargate ◆ GitHub ◆ OpenWeatherMap ◆ PowerDNS ➔ Outputs ◆ Health ◆ Syslog ➔ Serializers ◆ Wavefront ➔ Aggregators ◆ Final
  5. © 2019 InfluxData. All rights reserved. 7 V1.12 (September) ➔

    Inputs ◆ apcupsd ◆ Docker Logs ◆ Fireboard ◆ Logstash ◆ MarkLogic ◆ OpenNTPD ◆ uWSGI ➔ Outputs ◆ Exec ➔ Parsers ◆ Form ➔ Processors ◆ Date ◆ Pivot ◆ Unpivot ◆ Tag Limit
  6. © 2019 InfluxData. All rights reserved. 17 Output Plugins ➔

    71% 1 Output ➔ 5% 2 Outputs ➔ 2% 0 Outputs ➔ .6% 3 Outputs
  7. © 2019 InfluxData. All rights reserved. 18 Output Plugins ➔

    72% InfluxDB ➔ 5% File ➔ 2% Prometheus Client ➔ .9% Graphite ➔ .6% Kafka
  8. © 2019 InfluxData. All rights reserved. 19 Input Plugins ➔

    17% 1 Input ➔ 12% 9 Inputs ➔ 10% 8 Inputs ➔ 5% 10 Inputs ➔ 5% 11 Inputs ➔ 5% 6 Inputs ➔ 5% 7 Inputs ➔ 1 56 Inputs ?!?!
  9. © 2019 InfluxData. All rights reserved. 20 Input Plugins ➔

    58% CPU ➔ 53% Mem ➔ 52% Disk ➔ 51% System ➔ 47% DiskIO ➔ 47% Swap ➔ 40% Process ➔ 31% Kernel ➔ 28% Docker ➔ 23% Net
  10. © 2019 InfluxData. All rights reserved. 23 Multiple Outputs [[outputs.influxdb]]

    urls = ["http:/ /influxdb:8086"] [[outputs.influxdb_v2]] urls = ["http:/ /influxdb2:9999"]
  11. © 2019 InfluxData. All rights reserved. 26 Remote Configuration telegraf

    --config https://raw.githubusercontent.com /influxdata/telegraf/master/etc/telegraf.conf
  12. © 2019 InfluxData. All rights reserved. 28 Remote Configuration [agent]

    interval = “${INTERVAL}” [[outputs.influxdb_v2]] token = “${TOKEN}”
  13. © 2019 InfluxData. All rights reserved. 30 Output Resiliency Use

    metric_buffer_limit to handle downtime of your outputs
  14. © 2019 InfluxData. All rights reserved. 31 InfluxDB Telegraf Application

    Software Dependencies Bare Metal / VMs Network Buffer Batch
  15. © 2019 InfluxData. All rights reserved. 32 Telegraf Application Software

    Dependencies Bare Metal / VMs Network Buffer Batch
  16. © 2019 InfluxData. All rights reserved. 33 InfluxDB Telegraf Application

    Software Dependencies Bare Metal / VMs Network Buffer Batch
  17. © 2019 InfluxData. All rights reserved. 35 influxdb_listener Allows Telegraf

    to serve as a proxy for the /write endpoint of the InfluxDB HTTP API. Output Resiliency
  18. © 2019 InfluxData. All rights reserved. 39 http_listener_v2 Allows Telegraf

    to accept metrics over HTTP in any supported format Output Resiliency
  19. © 2019 InfluxData. All rights reserved. 45 Bring Your Own

    Telegraf FROM rawkode/telegraf:byo AS build FROM alpine:3.7 AS telegraf COPY --from=build /etc/telegraf /etc/telegraf COPY --from=build /binary /bin/telegraf ENTRYPOINT [ "/bin/telegraf" ]
  20. © 2019 InfluxData. All rights reserved. 46 Bring Your Own

    Telegraf BYOT BYOT Example Click Me! Click Me!
  21. © 2019 InfluxData. All rights reserved. 47 InfluxDB Telegraf Application

    Software Dependencies Bare Metal / VMs Network Buffer Batch
  22. © 2019 InfluxData. All rights reserved. 48 InfluxDB Application Software

    Dependencies Bare Metal / VMs Network Telegraf Telegraf Telegraf Telegraf
  23. © 2019 InfluxData. All rights reserved. 54 Health Output [[outputs.health]]

    service_address = "http://:5559" namepass = ["web-metrics"] [[outputs.health.compares]] field = "response_time" lt = 0.300
  24. © 2019 InfluxData. All rights reserved. 56 InfluxDB Application Software

    Dependencies Bare Metal / VMs Network Telegraf Telegraf Telegraf Telegraf Kafka Telegraf Telegraf