*
+
+
+
meteor
hugging
axum
+
xgboost
clj
babel
clj
+
gulp
+
+
groovy
neo4j
โˆš
helm
ansible
+
toml
<=
+
+
?
+
eslint
+
+
groovy
+
+
+
+
vscode
eslint
+
+
+
protobuf
+
ts
+
+
rails
+
preact
&&
+
+
+
riot
+
+
+
rollup
ionic
parcel
+
k8s
0x
+
intellij
โˆž
+
+
+
+
+
+
+
~
influxdb
gcp
+
+
deno
+
clickhouse
+
mongo
supabase
?
eclipse
+
f#
+
::
Back to Blog
๐Ÿ“Š Building Beautiful Monitoring Dashboards with Grafana on AlmaLinux: Visualize Your Data Like a Pro
AlmaLinux Grafana Monitoring

๐Ÿ“Š Building Beautiful Monitoring Dashboards with Grafana on AlmaLinux: Visualize Your Data Like a Pro

Published Aug 29, 2025

Learn to install and configure Grafana on AlmaLinux for stunning monitoring dashboards. Master data visualization, connect multiple data sources, create alerts, and build professional monitoring solutions!

5 min read
0 views
Table of Contents

๐Ÿ“Š Building Beautiful Monitoring Dashboards with Grafana on AlmaLinux: Visualize Your Data Like a Pro

Hey there, data visualization wizard! ๐Ÿง™โ€โ™€๏ธ Ever looked at walls of numbers and metrics and wished they could tell you a story at a glance? You know that feeling when youโ€™re trying to spot problems in your systems but drowning in log files and terminal outputs? Well, get ready for something magical - Grafana!

I still remember my first Grafana dashboardโ€ฆ it was like putting on glasses for the first time! ๐Ÿ‘“ Suddenly, all those confusing metrics transformed into beautiful, interactive graphs that actually made sense. By the end of this guide, youโ€™ll have your own stunning Grafana dashboards running, and honestly, youโ€™ll spend way too much time just admiring how pretty your data looks! ๐Ÿ˜„

๐Ÿค” Why is Grafana Important?

Grafana turns boring data into visual masterpieces! ๐ŸŽจ Let me show you why everyoneโ€™s obsessed with it:

The Magic of Grafana:

  • ๐Ÿ“ˆ Beautiful Visualizations - Transform data into stunning graphs and charts
  • ๐Ÿ”Œ Multiple Data Sources - Connect to Prometheus, InfluxDB, MySQL, and more!
  • ๐ŸŽฏ Real-Time Monitoring - Watch your systems live as things happen
  • ๐Ÿšจ Smart Alerting - Get notified before problems become disasters
  • ๐Ÿ“ฑ Responsive Design - Looks amazing on any device
  • ๐ŸŽจ Customizable Themes - Dark mode, light mode, your mode!
  • ๐Ÿ‘ฅ Team Collaboration - Share dashboards with your entire team
  • ๐Ÿ” Enterprise Security - Role-based access control and authentication

๐ŸŽฏ What You Need

Before we create monitoring magic, letโ€™s check our supplies! ๐Ÿ› ๏ธ Hereโ€™s what youโ€™ll need:

Prerequisites:

  • โœ… AlmaLinux 8 or 9 installed and running
  • โœ… Root or sudo access (we need admin powers!)
  • โœ… At least 2GB RAM (4GB recommended)
  • โœ… 10GB free disk space
  • โœ… Internet connection for package downloads
  • โœ… Basic understanding of web browsers
  • โœ… About 60 minutes of your time
  • โœ… Excitement to visualize everything! ๐ŸŽ‰

๐Ÿ“ Step 1: Installing Grafana

Letโ€™s get Grafana installed and ready to dazzle! โœจ This is where the visualization journey begins.

Add Grafana Repository:

# First, update your system - always start fresh!
sudo dnf update -y

# Install required packages
sudo dnf install -y wget curl

# Add Grafana YUM repository
sudo tee /etc/yum.repos.d/grafana.repo << 'EOF'
[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
EOF

# Update repository cache
sudo dnf makecache

# Check available Grafana versions
sudo dnf list grafana
# Shows available Grafana packages

Install and Start Grafana:

# Install Grafana (latest stable version)
sudo dnf install grafana -y

# Install additional helpful tools
sudo dnf install grafana-pcp -y  # Performance Co-Pilot plugin

# Enable Grafana to start on boot
sudo systemctl enable grafana-server

# Start Grafana service
sudo systemctl start grafana-server

# Check if Grafana is running
sudo systemctl status grafana-server
# Output: Active (running) - Excellent! ๐ŸŽ‰

# Check Grafana version
grafana-server -v
# Shows version info

Configure Firewall:

# Open Grafana port (3000 by default)
sudo firewall-cmd --permanent --add-port=3000/tcp

# If you'll use HTTPS later
sudo firewall-cmd --permanent --add-port=443/tcp

# Reload firewall to apply changes
sudo firewall-cmd --reload

# Verify ports are open
sudo firewall-cmd --list-ports
# Should show: 3000/tcp

๐Ÿ”ง Step 2: Initial Grafana Configuration

Time to configure Grafana for awesomeness! ๐Ÿš€ Letโ€™s make it yours.

Access Grafana Web Interface:

# Get your server's IP address
ip addr show | grep "inet "
# Note your IP (e.g., 192.168.1.100)

# Grafana URL will be:
echo "http://YOUR_SERVER_IP:3000"

# Default credentials:
# Username: admin
# Password: admin
# (You'll be forced to change password on first login!)

Configure Grafana Settings:

# Main configuration file location
sudo nano /etc/grafana/grafana.ini

# Key settings to consider (uncomment and modify):

# Change default port if needed
# [server]
# http_port = 3000

# Set your organization name
# [auth.anonymous]
# org_name = My Awesome Company

# Configure SMTP for email alerts
# [smtp]
# enabled = true
# host = smtp.gmail.com:587
# user = [email protected]
# password = your-app-password
# from_address = [email protected]

# Save and restart Grafana after changes
sudo systemctl restart grafana-server

Install Essential Plugins:

# List available plugins
grafana-cli plugins list-remote

# Install popular visualization plugins
sudo grafana-cli plugins install grafana-piechart-panel
sudo grafana-cli plugins install grafana-worldmap-panel
sudo grafana-cli plugins install grafana-clock-panel
sudo grafana-cli plugins install grafana-simple-json-datasource

# Install monitoring plugins
sudo grafana-cli plugins install redis-datasource
sudo grafana-cli plugins install elasticsearch-datasource

# List installed plugins
grafana-cli plugins ls

# Restart Grafana to load plugins
sudo systemctl restart grafana-server

๐ŸŒŸ Step 3: Setting Up Data Sources

Letโ€™s connect Grafana to your data! ๐Ÿ“ก This is where metrics become magic.

# Install Prometheus for metrics collection
sudo dnf install prometheus -y

# Enable and start Prometheus
sudo systemctl enable --now prometheus

# Configure Prometheus to scrape metrics
sudo nano /etc/prometheus/prometheus.yml

Add this basic configuration:

global:
  scrape_interval: 15s
  evaluation_interval: 15s

scrape_configs:
  - job_name: 'prometheus'
    static_configs:
      - targets: ['localhost:9090']
  
  - job_name: 'node'
    static_configs:
      - targets: ['localhost:9100']
  
  - job_name: 'grafana'
    static_configs:
      - targets: ['localhost:3000']
# Install Node Exporter for system metrics
wget https://github.com/prometheus/node_exporter/releases/download/v1.6.1/node_exporter-1.6.1.linux-amd64.tar.gz
tar xzf node_exporter-1.6.1.linux-amd64.tar.gz
sudo cp node_exporter-1.6.1.linux-amd64/node_exporter /usr/local/bin/

# Create systemd service for Node Exporter
sudo tee /etc/systemd/system/node_exporter.service << 'EOF'
[Unit]
Description=Node Exporter
After=network.target

[Service]
User=prometheus
Group=prometheus
Type=simple
ExecStart=/usr/local/bin/node_exporter

[Install]
WantedBy=multi-user.target
EOF

# Start Node Exporter
sudo systemctl daemon-reload
sudo systemctl enable --now node_exporter

# Restart Prometheus to pick up new config
sudo systemctl restart prometheus

Add Prometheus to Grafana:

# In Grafana Web UI:
# 1. Go to Configuration โ†’ Data Sources
# 2. Click "Add data source"
# 3. Select "Prometheus"
# 4. Configure:
#    - URL: http://localhost:9090
#    - Access: Server (default)
# 5. Click "Save & Test"

# You can also add via API:
curl -X POST http://admin:YOUR_PASSWORD@localhost:3000/api/datasources \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Prometheus",
    "type": "prometheus",
    "url": "http://localhost:9090",
    "access": "proxy",
    "isDefault": true
  }'

โœ… Step 4: Creating Your First Dashboard

Letโ€™s build something beautiful! ๐ŸŽจ Time to create your first monitoring masterpiece.

Create System Monitoring Dashboard:

# You can create dashboards via UI or import JSON

# Download a pre-made dashboard (Node Exporter Full)
curl -o node-exporter-dashboard.json \
  https://grafana.com/api/dashboards/1860/revisions/27/download

# Import via Grafana UI:
# 1. Go to Dashboards โ†’ Import
# 2. Upload the JSON file or paste dashboard ID: 1860
# 3. Select Prometheus data source
# 4. Click Import

Create Custom Dashboard via API:

# Create a simple CPU monitoring dashboard
cat > cpu-dashboard.json << 'EOF'
{
  "dashboard": {
    "title": "System CPU Monitoring ๐Ÿ–ฅ๏ธ",
    "panels": [
      {
        "id": 1,
        "title": "CPU Usage %",
        "type": "graph",
        "targets": [
          {
            "expr": "100 - (avg(irate(node_cpu_seconds_total{mode=\"idle\"}[5m])) * 100)",
            "legendFormat": "CPU Usage"
          }
        ],
        "gridPos": {"h": 8, "w": 12, "x": 0, "y": 0}
      },
      {
        "id": 2,
        "title": "Memory Usage",
        "type": "gauge",
        "targets": [
          {
            "expr": "(1 - (node_memory_MemAvailable_bytes / node_memory_MemTotal_bytes)) * 100",
            "legendFormat": "Memory %"
          }
        ],
        "gridPos": {"h": 8, "w": 12, "x": 12, "y": 0}
      }
    ],
    "refresh": "5s",
    "time": {"from": "now-1h", "to": "now"}
  },
  "overwrite": true
}
EOF

# Import dashboard via API
curl -X POST http://admin:YOUR_PASSWORD@localhost:3000/api/dashboards/db \
  -H "Content-Type: application/json" \
  -d @cpu-dashboard.json

๐ŸŽฎ Quick Examples

Letโ€™s create some amazing dashboards for real scenarios! ๐Ÿš€

Example 1: Website Performance Dashboard

# Create website monitoring dashboard
cat > website-monitor.json << 'EOF'
{
  "dashboard": {
    "title": "๐ŸŒ Website Performance Monitor",
    "panels": [
      {
        "title": "Response Time",
        "type": "graph",
        "targets": [{"expr": "probe_duration_seconds"}],
        "gridPos": {"h": 8, "w": 12, "x": 0, "y": 0}
      },
      {
        "title": "SSL Certificate Expiry",
        "type": "stat",
        "targets": [{"expr": "probe_ssl_earliest_cert_expiry"}],
        "gridPos": {"h": 8, "w": 12, "x": 12, "y": 0}
      },
      {
        "title": "HTTP Status",
        "type": "stat",
        "targets": [{"expr": "probe_http_status_code"}],
        "gridPos": {"h": 8, "w": 24, "x": 0, "y": 8}
      }
    ]
  }
}
EOF

# Import the dashboard
curl -X POST http://admin:YOUR_PASSWORD@localhost:3000/api/dashboards/db \
  -H "Content-Type: application/json" \
  -d @website-monitor.json

echo "Website monitoring dashboard created! ๐ŸŽ‰"

Example 2: Database Performance Dashboard

# For MySQL/MariaDB monitoring
# First, create MySQL user for monitoring
mysql -u root -p << 'EOF'
CREATE USER 'grafana'@'localhost' IDENTIFIED BY 'SecurePass123!';
GRANT PROCESS, REPLICATION CLIENT, SELECT ON *.* TO 'grafana'@'localhost';
FLUSH PRIVILEGES;
EOF

# Add MySQL data source in Grafana
curl -X POST http://admin:YOUR_PASSWORD@localhost:3000/api/datasources \
  -H "Content-Type: application/json" \
  -d '{
    "name": "MySQL",
    "type": "mysql",
    "url": "localhost:3306",
    "database": "mysql",
    "user": "grafana",
    "secureJsonData": {"password": "SecurePass123!"},
    "access": "proxy"
  }'

# Create database dashboard
echo "Database monitoring configured! ๐Ÿ“Š"

Example 3: Alert Rules for Critical Metrics

# Create alert for high CPU usage
cat > cpu-alert.json << 'EOF'
{
  "uid": "cpu-alert",
  "title": "High CPU Usage Alert",
  "condition": "query",
  "data": [
    {
      "refId": "A",
      "queryType": "",
      "model": {
        "expr": "100 - (avg(irate(node_cpu_seconds_total{mode=\"idle\"}[5m])) * 100)",
        "refId": "A"
      }
    }
  ],
  "noDataState": "NoData",
  "execErrState": "Alerting",
  "for": "5m",
  "annotations": {
    "description": "CPU usage is above 80% for more than 5 minutes",
    "runbook_url": "https://wiki.company.com/runbooks/high-cpu"
  },
  "labels": {
    "severity": "warning"
  }
}
EOF

# Create notification channel (Slack example)
cat > slack-channel.json << 'EOF'
{
  "name": "Slack Alerts",
  "type": "slack",
  "settings": {
    "url": "https://hooks.slack.com/services/YOUR/SLACK/WEBHOOK",
    "channel": "#alerts"
  }
}
EOF

echo "Alerting configured! You'll be notified of issues! ๐Ÿšจ"

๐Ÿšจ Fix Common Problems

Donโ€™t panic if something looks wrong! Here are fixes for common Grafana issues:

Problem 1: Canโ€™t Access Grafana Web Interface

# Check if Grafana is running
sudo systemctl status grafana-server

# Check logs for errors
sudo journalctl -u grafana-server -n 50

# Verify port is listening
sudo netstat -tulpn | grep 3000

# Check firewall isn't blocking
sudo firewall-cmd --list-ports

# Try accessing locally first
curl http://localhost:3000
# Should return HTML

# If port conflict, change port in config
sudo nano /etc/grafana/grafana.ini
# Find [server] section, change http_port

# Restart after any changes
sudo systemctl restart grafana-server

Problem 2: Data Source Connection Failed

# For Prometheus connection issues
# Check Prometheus is running
sudo systemctl status prometheus

# Test Prometheus directly
curl http://localhost:9090/api/v1/query?query=up

# Check network connectivity
telnet localhost 9090

# Verify firewall rules
sudo firewall-cmd --list-all

# Check SELinux isn't blocking
sudo setenforce 0  # Temporarily disable to test
# If this fixes it:
sudo setsebool -P httpd_can_network_connect 1
sudo setenforce 1

Problem 3: Dashboards Not Showing Data

# Check time range - most common issue!
# Ensure your time range matches when data exists

# Verify metrics are being collected
curl http://localhost:9090/api/v1/targets
# Should show targets as "up"

# Test query directly in Prometheus
curl 'http://localhost:9090/api/v1/query?query=up'

# Check Grafana datasource test
curl http://admin:PASSWORD@localhost:3000/api/datasources/1/health

# Clear Grafana cache
sudo systemctl restart grafana-server

# Check panel query for errors
# In panel edit mode, check "Query Inspector"

๐Ÿ“‹ Simple Commands Summary

Your Grafana command cheat sheet! ๐Ÿ“š Keep this handy:

TaskCommandWhat It Does
Start Grafanasudo systemctl start grafana-serverStarts Grafana ๐Ÿš€
Stop Grafanasudo systemctl stop grafana-serverStops Grafana ๐Ÿ›‘
Restart Grafanasudo systemctl restart grafana-serverRestarts service ๐Ÿ”„
Check Statussudo systemctl status grafana-serverShows if running โœ…
View Logssudo journalctl -u grafana-server -fLive log viewing ๐Ÿ“
Install Pluginsudo grafana-cli plugins install PLUGINAdds plugin ๐Ÿ”Œ
List Pluginsgrafana-cli plugins lsShows installed ๐Ÿ“‹
Update Grafanasudo dnf update grafanaUpdates version โฌ†๏ธ
Backup Grafanasudo tar -czf grafana-backup.tar.gz /var/lib/grafanaBackup data ๐Ÿ’พ
Reset Passwordgrafana-cli admin reset-admin-password NEW_PASSReset admin ๐Ÿ”
Export Dashboardcurl /api/dashboards/uid/DASHBOARD_UIDExport JSON ๐Ÿ“ค
Check Versiongrafana-server -vShows version ๐Ÿ“Š

๐Ÿ’ก Tips for Success

Here are my pro tips for Grafana mastery! ๐ŸŽฏ

Dashboard Design Best Practices:

  • ๐ŸŽจ Use consistent colors - Create a color scheme and stick to it
  • ๐Ÿ“Š Right visualization for right data - Gauges for current, graphs for trends
  • ๐Ÿ” Donโ€™t overcrowd - White space is your friend
  • โšก Set appropriate refresh rates - Balance freshness vs performance
  • ๐Ÿ“ฑ Test on mobile - Many people check dashboards on phones
  • ๐ŸŽฏ Group related metrics - Logical organization helps understanding
  • ๐Ÿ’ก Use variables - Make dashboards reusable with template variables
  • ๐ŸŒ™ Provide dark/light themes - Users have preferences!

Performance Optimization:

  • โšก Optimize queries - Efficient PromQL saves resources
  • ๐Ÿš€ Use recording rules - Pre-calculate expensive queries
  • ๐Ÿ“Š Limit time ranges - Donโ€™t query years when you need hours
  • ๐ŸŽฏ Cache when possible - Enable query caching
  • ๐Ÿ’พ Regular cleanup - Remove unused dashboards
  • ๐Ÿ”ง Tune database - Optimize your data source performance

๐Ÿ† What You Learned

Wow, look at what youโ€™ve accomplished! ๐ŸŽŠ Youโ€™re now a Grafana master!

Your Achievements:

  • โœ… Installed and configured Grafana
  • โœ… Set up data sources (Prometheus)
  • โœ… Created beautiful dashboards
  • โœ… Configured monitoring for systems
  • โœ… Set up alerting rules
  • โœ… Installed visualization plugins
  • โœ… Learned troubleshooting techniques
  • โœ… Mastered dashboard design
  • โœ… Built real-world monitoring solutions
  • โœ… Became a data visualization expert!

๐ŸŽฏ Why This Matters

Your Grafana setup isnโ€™t just pretty graphs - itโ€™s your window into system health! ๐ŸŒŸ

With Grafana mastery, you can now:

  • ๐Ÿ‘๏ธ See problems before users do - Proactive monitoring
  • ๐Ÿ“ˆ Track performance trends - Spot degradation early
  • ๐Ÿšจ Get instant alerts - Never miss critical issues
  • ๐Ÿ“Š Impress stakeholders - Beautiful reports and dashboards
  • ๐Ÿ” Debug faster - Visual data tells stories
  • ๐Ÿ’ก Make data-driven decisions - Numbers donโ€™t lie
  • ๐Ÿ‘ฅ Share insights - Team-wide visibility
  • ๐ŸŽฏ Optimize systems - See what needs improvement

Remember when monitoring meant staring at log files? Now you have beautiful, interactive dashboards that make monitoring actually enjoyable! Youโ€™ve transformed raw data into visual insights that anyone can understand. Thatโ€™s seriously impressive! ๐ŸŒŸ

Keep visualizing, keep monitoring, and most importantly, enjoy your beautiful Grafana dashboards! ๐ŸŽจ

Happy monitoring, and welcome to the world of beautiful data visualization! ๐Ÿ™Œ


P.S. - Donโ€™t forget to share your coolest dashboards with the team. Theyโ€™ll be amazed! โญ