Question: How to install telegraf on RHEL 8 / CentOS 8?. Telegraf is a powerful monitoring agent used for collecting and reporting performance metrics from the system it is running on. It is part of TICK Stack. The metrics collected by Telegraf can be saved in a time-series database such as InfluxDB or any other supported data store.
Features of Telegraf
Here are the key features of Telegraf metrics collector.
- Has small memory footprint – the power of Go
- Being written in Go. It compiles into a single binary with no external dependencies.
- It is plugin-driven to allow easy addition of new inputs and outputs
- Supports InfluxDB, Graphite, OpenTSDB, Datadog, Librato, Kafka, MQTT, NSQ, and many other datastores.
Install Telegraf on RHEL 8 / CentOS 8
As of this writing, there is no official repository for RHEL 8 but we will use InfluxData repository for RHEL 7 which works fine.
Update your system RHEL 8 system.
sudo yum -y update
Step 1: Add Influxdata RPM repository
Then add Influxdata RPM repository.
cat <
Step 2: Install Telegraf on RHEL 8 / CentOS 8
Once the repository has been added, install Telegraf on RHEL 8 using the command below.
sudo yum -y install telegraf
You can view package details with rpm command.
$ rpm -qi telegraf
Name : telegraf
Version : 1.22.1
Release : 1
Architecture: x86_64
Install Date: Wed Apr 20 11:24:03 2022
Group : default
Size : 143683286
License : MIT
Signature : RSA/SHA256, Thu Apr 7 16:19:49 2022, Key ID 684a14cf2582e0c5
Source RPM : telegraf-1.22.1-1.src.rpm
Build Date : Thu Apr 7 15:14:05 2022
Build Host : c9678744ec77
Relocations : /
Packager : [email protected]
Vendor : InfluxData
URL : https://github.com/influxdata/telegraf
Summary : Plugin-driven server agent for reporting metrics into InfluxDB.
Description :
Plugin-driven server agent for reporting metrics into InfluxDB.
Step 3: Start and Configure Telegraf Service on RHEL 8 / CentOS 8
Now that telegraf is installed on RHEL 8, let’s start the service and enable it to start on boot.
sudo systemctl enable --now telegraf
Confirm status.
$ systemctl status telegraf
● telegraf.service - The plugin-driven server agent for reporting metrics into InfluxDB
Loaded: loaded (/usr/lib/systemd/system/telegraf.service; enabled; vendor preset: disabled)
Active: active (running) since Fri 2019-03-08 21:26:12 EAT; 5s ago
Docs: https://github.com/influxdata/telegraf
Main PID: 1906 (telegraf)
Tasks: 10 (limit: 11510)
Memory: 15.7M
CGroup: /system.slice/telegraf.service
└─1906 /usr/bin/telegraf -config /etc/telegraf/telegraf.conf -config-directory /etc/telegraf/telegraf.d
Mar 08 21:26:12 rhe8.local systemd[1]: Started The plugin-driven server agent for reporting metrics into InfluxDB.
Mar 08 21:26:12 rhe8.local telegraf[1906]: 2019-03-08T18:26:12Z I! Starting Telegraf 1.10.0
Mar 08 21:26:12 rhe8.local telegraf[1906]: 2019-03-08T18:26:12Z I! Loaded inputs: processes swap system cpu disk diskio kernel mem
Mar 08 21:26:12 rhe8.local telegraf[1906]: 2019-03-08T18:26:12Z I! Loaded aggregators:
Mar 08 21:26:12 rhe8.local telegraf[1906]: 2019-03-08T18:26:12Z I! Loaded processors:
Mar 08 21:26:12 rhe8.local telegraf[1906]: 2019-03-08T18:26:12Z I! Loaded outputs: influxdb
Mar 08 21:26:12 rhe8.local telegraf[1906]: 2019-03-08T18:26:12Z I! Tags enabled: host=rhe8.local
Mar 08 21:26:12 rhe8.local telegraf[1906]: 2019-03-08T18:26:12Z I! [agent] Config: Interval:10s, Quiet:false, Hostname:"rhe8.local", Flush Interval:10s
Mar 08 21:26:12 rhe8.local telegraf[1906]: 2019-03-08T18:26:12Z W! [outputs.influxdb] when writing to [http://localhost:8086]: database "" creation fa>
Step 4: Configure Telegraf on RHEL 8 / CentOS 8
Follow our guide below to see example on configuration of Telegraf.
For Telegraf and Grafana installation, use the links below.