Introduction
The TIG Stack is a powerful monitoring solution that includes Telegraf for collecting metrics, InfluxDB for storing time-series data, and Grafana for visualizing the data. This tutorial will guide you through the process of installing the TIG Stack on Rocky Linux.
Prerequisites
Before you begin, ensure you have:
- A Rocky Linux system
- Root or sudo privileges
Step 1: Install InfluxDB
Add the InfluxData repository:
sudo dnf install -y https://repos.influxdata.com/influxdb-release-1.rpm
Install InfluxDB:
sudo dnf install -y influxdb
Start and enable the InfluxDB service:
sudo systemctl start influxdb
sudo systemctl enable influxdb
Step 2: Install Telegraf
Add the InfluxData repository:
sudo dnf install -y https://repos.influxdata.com/telegraf-release-1.rpm
Install Telegraf:
sudo dnf install -y telegraf
Start and enable the Telegraf service:
sudo systemctl start telegraf
sudo systemctl enable telegraf
Step 3: Install Grafana
Add the Grafana repository:
sudo dnf install -y https://packages.grafana.com/oss/rpm/grafana-8.1.2-1.x86_64.rpm
Install Grafana:
sudo dnf install -y grafana
Start and enable the Grafana service:
sudo systemctl start grafana-server
sudo systemctl enable grafana-server
Step 4: Configure Grafana
Open a web browser and navigate to http://localhost:3000
.
Login with the default username and password (admin/admin).
Change the password and configure Grafana as needed.
Step 5: Configure Data Source
Add InfluxDB as a data source in Grafana:
- Go to Configuration > Data Sources > Add data source.
- Choose InfluxDB.
- Enter the InfluxDB URL (http://localhost:8086) and database details.
- Save and test the data source.
Conclusion
Congratulations! You have successfully installed the TIG Stack (Telegraf, InfluxDB, and Grafana) on Rocky Linux. You can now start collecting, storing, and visualizing metrics using this powerful monitoring solution.