Gotta Collect 'Em All

Metrics Easily Visualised

Who am I?

  • Student at Graz University of Technology 🎓
  • System Analyst at BearingPoint 🌿
  • Linux experience of about 6 years 💻
  • Previously HW/SW-Developer and SysAdmin 🌱
  • Likes to play Basketball 🏀

How I got into my sports courses?

What happened after?

Why even collect metrics?

Provide system health overview

  • View uptime and status
  • Explore usage stats (CPU, RAM, Disk I/O etc.)
  • Examine Package update status
  • Verify network health

Avoid disasters

  • Monitor critical processes and jobs
  • View disk usage
  • Check backup status

Prevent disk failure

  • Observe S.M.A.R.T results
  • Track temperatures

Collect IoT data

  • Gather IoT sensor readings
  • Probe webserver status

What is Telegraf?

  • Free Open Source Software
  • Metrics Agent
  • Written in Go
  • Plugin-driven

Why would you want to use it?

  • Single binary
  • Minimal memory footprint
  • High flexibility
  • Straightforward setup

How can it be deployed?

  • Binary
  • Ansible role
  • Docker container
  • Kubernetes deployment

Let’s see some examples!

Basic Configuration

telegraf --input-filter cpu --output-filter influxdb config

Plugin Configuration

Input Plugins

  • Sensors (lm_sensors)
  • S.M.A.R.T.
  • HTTP response
  • X.509 Certificate
  • Wireguard
  • Minecraft scoreboard
  • YouTube

Example Input Plugins

Even More Input Plugins

  • Octoprint API
  • OpenWeatherMap
  • PostgreSQL/MySQL queries
  • Proxmox API
  • MQTT Consumer
  • Octoprint API
  • CS:GO server statistics
  • many more …

Aggregator and Processor Plugins

Output Plugins

  • InfluxDB
  • Exec
  • File
  • Prometheus
  • MQTT Producer

Docker Compose Setup

Docker Images

docker pull telegraf
docker pull telegraf:1.18
docker pull telegraf:1.18-alpine

Docker Container Monitoring

Docker Input Plugin

Dashboard Search

Docker Dashboard

Environment Variables

Linux System Monitoring

System Input Plugins

Host Overview Dashboard

More dashboards

Simulating top

Mentioned resources

Mentioned resources

Attributions

Attributions

Thanks!

curl -sL https://matthias.thym.at/card

https://blog.thym.at/p/glt21/