In this guide, I’ll show you how to Install Telegraf on Fedora 39/38/37/36/35/34. Telegraf is an agent written in Go for collecting, processing, aggregating, and writing metrics to a time series database such as InfluxDB, Prometheus e.t.c.
The metrics collected by Telegraf agents running on servers will be pushed to InfluxDB. Below are some cool features of Telegraf:
- Support for a wide variety of inputs and outputs, including various databases, message queues, and APIs
- A plugin-based architecture that allows for easy customization and extension
- Built-in support for parsing common log formats, like syslog and JSON
- Support for both push- and pull-based metric collection
- Support for tagging and filtering data
- Built-in support for aggregation and processing of metrics, such as calculating running averages or histograms
- Support for running as a service and daemon on various operating systems
If you don’t have a running instance of InfluxDB, refer to our guides below on installing InfluxDB:
- How to Install InfluxDB on Fedora
- Install InfluxDB on Ubuntu / Debian
- Install Grafana and InfluxDB on CentOS 7
Below are the steps for installing InfluxDB on Fedora.
Step 1: Add Influxdata RPM repository
Influxdata provides the repository for installing Telegraf on Fedora. Add it to your system first by running the command below.
cat <<EOF | sudo tee /etc/yum.repos.d/influxdata.repo
[influxdata]
name = InfluxData Repository - Stable
baseurl = https://repos.influxdata.com/stable/\$basearch/main
enabled = 1
gpgcheck = 1
gpgkey = https://repos.influxdata.com/influxdata-archive_compat.key
EOF
Step 2: Install Telegraf on Fedora
Install Telegraf on Fedora by running below command in your terminal.
sudo dnf -y install telegraf
If you want to know the exact version of Telegraf installed, use:
$ rpm -qi telegraf
Name : telegraf
Version : 1.28.4
Release : 1
Architecture: x86_64
Install Date: Wed 15 Nov 2023 01:20:37 AM UTC
Group : default
Size : 204919543
License : MIT
Signature : RSA/SHA512, Mon 13 Nov 2023 09:24:19 PM UTC, Key ID d8ff8e1f7df8b07e
Source RPM : telegraf-1.28.4-1.src.rpm
Build Date : Mon 13 Nov 2023 08:25:02 PM UTC
Build Host : 60993c985c22
Relocations : /
Packager : [email protected]
Vendor : InfluxData
URL : https://github.com/influxdata/telegraf
Summary : Plugin-driven server agent for reporting metrics into InfluxDB.
....
Step 3: Start and configure Telegraf on Fedora
Start telegraf service:
sudo systemctl start telegraf
sudo systemctl enable telegraf
Well, you made it, the next phase will be the configuration of Telegraf to pull and push your desired system metrics to InfluxDB. For this, you’ll find our guide below useful.
We have other monitoring tutorials such as:
- Monitoring Ceph Cluster with Prometheus and Grafana
- How to Monitor Redis Server with Prometheus and Grafana in 5 minutes
- How to Monitor Linux Server Performance with Prometheus and Grafana in 5 minutes
- How to Monitor BIND DNS server with Prometheus and Grafana
- Monitoring MySQL / MariaDB with Prometheus in five minutes
- How to Monitor Apache Web Server with Prometheus and Grafana in 5 minutes