Share on Social Media

Learn how to effortlessly install Grafana on Linux 9 with our comprehensive guide. Unlock powerful visualization and monitoring capabilities to optimize your system’s performance effectively. #centlinux #linux #grafana

What is Grafana?

Grafana is an open-source data visualization and monitoring tool used for analyzing and monitoring time-series data. It provides a rich set of features and a flexible and customizable platform for creating interactive dashboards and graphs. Grafana supports a wide range of data sources, including popular databases like MySQL, PostgreSQL, and Prometheus, as well as cloud services like AWS CloudWatch and Google Analytics.

With Grafana, you can connect to various data sources, query the data, and create visually appealing and informative dashboards. It offers a web-based interface that allows users to build and configure their dashboards using a drag-and-drop approach. You can add different panels to a dashboard, such as graphs, tables, or gauges, and customize them with various visualization options and settings.

Grafana also supports alerting and notification features, allowing you to set up alerts based on defined thresholds or conditions. When a threshold is breached or a condition is met, Grafana can send notifications via email, Slack, PagerDuty, or other messaging platforms.

Overall, Grafana is widely used in the field of DevOps and system monitoring to monitor infrastructure, applications, and services, providing real-time insights into the performance and health of systems. It is highly extensible and has a large community of contributors, which ensures continuous development and integration with various data sources and technologies.

Read Also: How to install Grafana Dashboard Software on Rocky Linux 8

What is Grafana Agent?

The Grafana Agent is an open-source telemetry agent developed by Grafana Labs. It is designed to collect, process, and send metrics, logs, and traces from various sources to monitoring and observability platforms like Grafana Cloud or Grafana Enterprise.

Key features of the Grafana Agent include:

  1. Efficient Metric Collection: It efficiently collects metrics from systems, services, and applications, supporting various metric formats and protocols such as Prometheus exposition format.
  2. Log Collection and Forwarding: The Grafana Agent can collect logs from files and forward them to centralized logging systems or storage solutions.
  3. Tracing Support: It supports distributed tracing by collecting and forwarding traces from applications instrumented with OpenTelemetry or other tracing libraries.
  4. Resource Efficiency: The Agent is designed to be lightweight and resource-efficient, suitable for deployment in various environments including containers, virtual machines, and bare-metal servers.
  5. Integration with Grafana: The Grafana Agent seamlessly integrates with Grafana for visualization, alerting, and analysis of collected metrics, logs, and traces.

Overall, the Grafana Agent simplifies the process of collecting telemetry data and forwarding it to Grafana or other compatible monitoring platforms, enabling organizations to gain insights into the performance and health of their systems.

Environment Specification

We are using a minimal Rocky Linux 9 virtual machine with following specifications.

  • CPU – 3.4 Ghz (2 cores)
  • Memory – 2 GB
  • Storage – 20 GB
  • Operating SystemRocky Linux release 9.2 (Blue Onyx)
  • Hostname –
  • IP Address –

Prepare your Rocky Linux Server

By using a ssh client, login on your Linux server as root user.

Set a fully qualified domain name (FQDN) for your Linux machine as follows.

# hostnamectl set-hostname

Update software packages in your Linux OS by using dnf command.

# dnf update -y

If the previous command updates your Linux Kernel, then you should reboot your machine with the newly installed Kernel.

# reboot

Note down the versions of Linux OS and Kernel that are being used in this tutorial.

# cat /etc/rocky-release
Rocky Linux release 9.2 (Blue Onyx)

# uname -r

Installing Grafana Official Yum Repository

You can download Grafana software from their official website and GitHub. But the preferred method for Red Hat Linux distros is to add their official yum repository and then install Grafana data visualization software by using dnf command.

Create a .repo file by using vim text editor.

# vi /etc/yum.repos.d/grafana.repo

Add following directives in this file.


After installing Grafana repository, rebuild your yum cache.

# dnf makecache
grafana                                         183  B/s | 629  B     00:03
grafana                                         1.9 kB/s | 2.4 kB     00:01
Importing GPG key 0x2CF3C0C6:
 Userid     : "Grafana Labs <>"
 Fingerprint: 0E22 EB88 E39E 1227 7A77 60AE 9E43 9B10 2CF3 C0C6
 From       :
Is this ok [y/N]: y
grafana                                         825 kB/s |  33 MB     00:41
Rocky Linux 9 - BaseOS                          1.3 kB/s | 4.1 kB     00:03
Rocky Linux 9 - AppStream                       2.1 kB/s | 4.5 kB     00:02
Rocky Linux 9 - Extras                          1.3 kB/s | 2.9 kB     00:02
Metadata cache created.

Install Grafana on Rocky Linux 9

Check the information about grafana software package.

# dnf info grafana.x86_64
Last metadata expiration check: 0:11:58 ago on Sun 21 May 2023 12:41:12 AM PKT.
Installed Packages
Name         : grafana
Version      : 9.5.2
Release      : 1
Architecture : x86_64
Size         : 273 M
Source       : grafana-9.5.2-1.src.rpm
Repository   : @System
From repo    : grafana
Summary      : Grafana
URL          :
License      : AGPLv3
Description  : Grafana

Now, you can install Grafana on Linux by executing dnf command.

# dnf install -y grafana

In this Linux tutorial, we are installing Open-source edition of Grafana server. Alternatively, you can also install Grafana Enterprise edition by running following command.

# dnf install -y grafana-enterprise

Enable and start Grafana service.

# systemctl enable --now grafana-server
Synchronizing state of grafana-server.service with SysV service script with /usr/lib/systemd/systemd-sysv-install.
Executing: /usr/lib/systemd/systemd-sysv-install enable grafana-server
Created symlink /etc/systemd/system/ → /usr/lib/systemd/system/grafana-server.service.

Check the status of Grafana service for any possible errors.

# systemctl status grafana-server
● grafana-server.service - Grafana instance
Loaded: loaded (/usr/lib/systemd/system/grafana-server.service; enabled; p>
Active: active (running) since Sun 2023-05-21 00:28:43 PKT; 40s ago
Main PID: 5695 (grafana)
Tasks: 7 (limit: 23011)
Memory: 66.2M
CPU: 8.236s
CGroup: /system.slice/grafana-server.service
└─5695 /usr/share/grafana/bin/grafana server --config=/etc/grafana>

May 21 00:28:43 grafana[5695]: logger=modules t=2023-0>
May 21 00:28:43 systemd[1]: Started Grafana instance.
May 21 00:28:43 grafana[5695]: logger=grafanaStorageLo>
May 21 00:28:43 grafana[5695]: logger=http.server t=20>
May 21 00:28:43 grafana[5695]:>
May 21 00:28:43 grafana[5695]:>
May 21 00:28:43 grafana[5695]: logger=ticker t=2023-05>
May 21 00:28:43 grafana[5695]: logger=ngalert.multiorg>
May 21 00:28:43 grafana[5695]: logger=plugins.update.c>
May 21 00:28:43 grafana[5695]: logger=grafana.update.c>

To make your Grafana Dashboards accessible from Network, you need to allow the grafana service in Linux Firewall.

# firewall-cmd --permanent --add-service=grafana

# firewall-cmd --reload

Access Grafana Dashboards

Open URL in a web browser.

Grafana Dashboard Login
Grafana Dashboard Login

Login to Grafana dashboards by using default username/password i.e. admin/admin

Grafana Dashboard Set Password
Grafana Dashboard Set Password

Set a new strong password for your Grafana admin user.

Grafana Dashboard
Grafana Dashboard

You have successfully login to Grafana web application.

Video: Grafana installation on Rocky Linux 9

YouTube player

Final Thoughts

Embark on the journey to enhance your system’s monitoring capabilities by installing Grafana on Linux 9. With our comprehensive guide, navigating the installation process becomes a breeze, unlocking the power of visualization and monitoring for your infrastructure. Let’s empower your system with Grafana and pave the way for insightful analytics and proactive performance management. To start building some amazing dashboards, we suggest that you should attend online training Grafana Beginners to Advance Crash Course 2021udemy link

Leave a Reply