What Is Grafana?
Grafana is an open-source monitoring and analytics platform used to visualize metrics, logs, and performance data through customizable dashboards. It supports a wide variety of data sources and allows administrators to monitor servers, applications, databases, cloud environments, and network infrastructure from a centralized interface.
Grafana has become one of the most widely used monitoring tools in Linux environments because it provides real-time visibility into system health and performance while remaining highly flexible and extensible.
Organizations commonly use Grafana for:
- Server monitoring
- Infrastructure monitoring
- Application performance tracking
- Database monitoring
- Network monitoring
- Cloud platform analytics
- Business intelligence dashboards
When combined with tools such as Prometheus, InfluxDB, Elasticsearch, or Loki, Grafana becomes a powerful observability platform capable of delivering detailed insights into both system and application behavior.
Understanding Grafana Dashboards
Grafana dashboards provide a web-based interface that displays collected data through charts, graphs, gauges, tables, and other visualization methods.
Each dashboard consists of one or more panels that retrieve information from connected data sources.
WordPress Web Hosting
Starting From $3.99/Monthly
Administrators can:
- Create custom dashboards
- Organize panels by service or application
- Display real-time metrics
- Analyze historical trends
- Configure alerts and notifications
This flexibility allows teams to tailor monitoring environments to their specific operational requirements.
Prerequisites
Before installing Grafana on AlmaLinux, ensure the following requirements are met.
Operating System
Supported environment:
- AlmaLinux 8
- AlmaLinux 9
Hardware Requirements
Minimum:
- 512 MB RAM
Recommended:
Cheap VPS Server
Starting From $2.99/Monthly
- 2 GB RAM for small deployments
- 8 GB RAM or more for larger monitoring environments
Access Requirements
You will need:
- Root access
- sudo privileges
- Internet connectivity for repository access
Step 1: Add the Grafana Repository
Grafana packages are not included in AlmaLinux repositories by default.
Create a repository configuration file:
sudo nano /etc/yum.repos.d/grafana.repo
Add the following repository configuration:
[grafana]
name=grafana
baseurl=https://rpm.grafana.com
repo_gpgcheck=1
enabled=1
gpgcheck=1
gpgkey=https://rpm.grafana.com/gpg.key
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
Save the file and exit the editor.
Step 2: Update AlmaLinux
Before installing Grafana, update existing system packages.
Windows VPS Hosting
Remote Access & Full Admin
For AlmaLinux 8 and 9:
sudo dnf update -y
Keeping the operating system updated helps ensure compatibility and security.
Step 3: Install Grafana
Install the Grafana package using DNF:
sudo dnf install grafana -y
During installation, several supporting packages may also be installed automatically.
Common dependencies include:
- fontconfig
- dejavu-fonts-common
- dejavu-sans-fonts
- fontpackages-filesystem
Once installation completes, Grafana binaries and configuration files will be available on the system.
Step 4: Start and Enable Grafana
After installation, start the Grafana service:
sudo systemctl start grafana-server
Enable the service to start automatically after system reboots:
sudo systemctl enable grafana-server
Verify Service Status
Check that Grafana is running correctly:
sudo systemctl status grafana-server
A healthy installation should display output indicating:
Active: active (running)
If the service is not running, review logs and verify installation steps.
Step 5: Configure Firewall Access
Grafana listens on TCP port 3000 by default.
If firewalld is enabled, allow incoming connections:
sudo firewall-cmd --zone=public --add-port=3000/tcp --permanent
Reload the firewall configuration:
sudo firewall-cmd --reload
Verify the rule:
sudo firewall-cmd --list-ports
You should see:
3000/tcp
Step 6: Access the Grafana Web Interface
Open a web browser and navigate to:
http://SERVER_IP:3000
Replace SERVER_IP with your server’s public IP address.
Example:
http://192.168.1.100:3000
The Grafana login page should appear.
Default Login Credentials
The default administrator account is:
Username: admin
Password: admin
Upon first login, Grafana will require you to change the default password.
Choose a strong password before proceeding.
Exploring the Grafana Dashboard
After authentication, the Grafana home dashboard becomes available.
From the main interface you can:
- Add data sources
- Create dashboards
- Configure alerts
- Install plugins
- Monitor infrastructure
- Analyze performance metrics
At this stage, Grafana is fully operational and ready for configuration.
Adding Data Sources
A data source is the backend system from which Grafana retrieves monitoring information.
Popular data sources include:
- Prometheus
- InfluxDB
- MySQL
- PostgreSQL
- Elasticsearch
- Loki
- Graphite
- Microsoft SQL Server
To add a data source:
- Open Connections.
- Select Data Sources.
- Click Add Data Source.
- Choose the desired source.
- Configure connection settings.
- Save and test the configuration.
Once connected, data can be visualized using dashboards and panels.
Updating Grafana
Regular updates provide security fixes, new features, and performance improvements.
Before upgrading, consider backing up:
- Configuration files
- Dashboards
- Data sources
- User settings
Stop Grafana
Stop the service before updating:
sudo systemctl stop grafana-server
Install Available Updates
Update Grafana:
sudo dnf update grafana -y
Start Grafana Again
Restart the service:
sudo systemctl start grafana-server
Verify status:
sudo systemctl status grafana-server
Confirm the service returns to an active state after the upgrade.
Uninstalling Grafana
If Grafana is no longer required, it can be removed from the system.
Remove the package:
sudo dnf remove grafana -y
This removes the application and associated dependencies.
Remove Grafana Configuration Files
To completely remove Grafana data and configuration files:
sudo rm -rf /etc/grafana
sudo rm -rf /var/lib/grafana
sudo rm -rf /var/log/grafana
Be cautious when executing these commands because all Grafana configurations, dashboards, and stored data will be permanently deleted.
Common Grafana Issues
Dashboards Not Updating
Potential causes include:
- Incorrect refresh intervals
- Data source connection issues
- Query errors
- Network connectivity problems
Verify data source status and dashboard settings.
Cannot Access Port 3000
Check:
- Firewall rules
- Security groups
- SELinux policies
- Service status
Useful commands:
sudo systemctl status grafana-server
sudo ss -tulpn | grep 3000
Login Problems
If credentials are lost, the administrator password can be reset using Grafana administrative tools.
Ensure the Grafana database and configuration files remain accessible.
What Are Grafana Plugins?
Grafana plugins extend functionality beyond the default installation.
Plugin categories include:
- Data source plugins
- Dashboard plugins
- Visualization plugins
- Application plugins
Plugins allow integration with additional monitoring platforms and visualization methods.
Building a Monitoring Platform with Grafana
Grafana provides a powerful and flexible platform for monitoring Linux infrastructure, applications, and services. By combining customizable dashboards, extensive data source support, real-time analytics, and alerting capabilities, administrators can gain deeper visibility into system performance and operational health.
Whether monitoring a single VPS or a large enterprise infrastructure, Grafana offers a scalable solution that helps teams identify issues faster, optimize resources, and make informed operational decisions.
