Language & currency
Currency

Site Web gratuit & Serveur Migration

Colonel Serveur
Grafana Setup - Install Grafana on AlmaLinux

What Is Grafana?

Grafana is an open-source monitoring and analytics platform used to visualize metrics, journaux, and performance data through customizable dashboards. It supports a wide variety of data sources and allows administrators to monitor servers, candidatures, bases de données, environnements cloud, 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, graphiques, gauges, tables, and other visualization methods.

Each dashboard consists of one or more panels that retrieve information from connected data sources.

Wordpress Hosting

Hébergement Web WordPress

À partir de 3,99 $/mois

Acheter maintenant

Les administrateurs peuvent:

  • 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.

Conditions préalables

Before installing Grafana on AlmaLinux, s'assurer que les exigences suivantes sont respectées.

Système opérateur

Supported environment:

  • AlmaLinux 8
  • AlmaLinux 9

Hardware Requirements

Minimum:

  • 512 MB RAM

Recommandé:

Cheap VPS

Serveur VPS pas cher

À partir de 2,99 $/mois

Acheter maintenant
  • 2 GB RAM for small deployments
  • 8 GB RAM or more for larger monitoring environments

Access Requirements

Vous aurez besoin:

  • Accès racine
  • sudo privileges
  • Internet connectivity for repository access

Étape 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

Enregistrez le fichier et quittez l'éditeur.

Étape 2: Mettre à jour AlmaLinux

Before installing Grafana, update existing system packages.

Windows VPS

Hébergement VPS Windows

Accès à distance et administrateur complet

Acheter maintenant

For AlmaLinux 8 et 9:

sudo dnf update -y

Garder le système d'exploitation à jour permet de garantir la compatibilité et la sécurité.

Étape 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.

Étape 4: Start and Enable Grafana

Après l'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.

Étape 5: Configure Firewall Access

Grafana listens on TCP port 3000 par défaut.

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

Tu devrais voir:

3000/tcp

Étape 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.

Exemple:

http://192.168.1.100:3000

The Grafana login page should appear.

Identifiants de connexion par défaut

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

A ce stade, 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:

  • Prométhée
  • InfluxDB
  • MySQL
  • PostgreSQL
  • Elasticsearch
  • Loki
  • Graphite
  • Microsoft SQL Server

To add a data source:

  1. Ouvrir Connections.
  2. Sélectionner Data Sources.
  3. Cliquez Add Data Source.
  4. Choose the desired source.
  5. Configure connection settings.
  6. Save and test the configuration.

Une fois connecté, data can be visualized using dashboards and panels.

Updating Grafana

Regular updates provide security fixes, new features, and performance improvements.

Avant la mise à niveau, consider backing up:

  • Fichiers de configuration
  • 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, tableaux de bord, 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

Vérifier:

  • Règles de pare-feu
  • Security groups
  • SELinux policies
  • Statut des services

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, candidatures, et prestations. 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.

Partager cette publication

Laisser un commentaire

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *