Grafana Dashboards
Grafana is an open-source visualization platform that turns metrics data into interactive dashboards. It supports dozens of data sources (Prometheus, InfluxDB, Elasticsearch, MySQL, and more) and has a large community library of pre-built dashboards. Instead of building dashboards from scratch, you can import a community dashboard for Node Exporter, Nginx, or MySQL with one click and have production-quality monitoring immediately.
Installing Grafana
# Add Grafana repository:
wget -q -O - https://packages.grafana.com/gpg.key | sudo apt-key add -
echo "deb https://packages.grafana.com/oss/deb stable main" | sudo tee /etc/apt/sources.list.d/grafana.list
sudo apt update && sudo apt install -y grafana
sudo systemctl enable --now grafana-server
# Access at http://localhost:3000 (default user/pass: admin/admin)
Grafana first login
Default credentials: admin / admin
→ You will be prompted to change the password on first login
→ Restrict to localhost and proxy via nginx with SSL for production use
Connecting data sources
# In Grafana UI:
# Configuration (gear icon) > Data Sources > Add data source
# For Prometheus:
# Type: Prometheus
# URL: http://localhost:9090
# Access: Server (default)
# Click "Save & Test"
# For direct database queries (MySQL):
# Type: MySQL
# Host: localhost:3306
# Database: your_database
# User: readonly_user
# Password: ***
Importing community dashboards
# Best dashboards to import for a Linux server:
# 1193 = Node Exporter Full (CPU, memory, disk, network for Linux servers)
# 12485 = Node Exporter + Prometheus 2.0
# 9628 = PostgreSQL Database (requires postgres_exporter)
# 7362 = MySQL Overview (requires mysql_exporter)
# Import procedure:
# + (Create) > Import
# Enter dashboard ID (e.g., 1193)
# Select your Prometheus data source
# Click Import
Creating your own panels
# Add a new panel to a dashboard:
# Edit Dashboard > Add Panel > Choose visualization type
# PromQL query examples for common panels:
# CPU utilization (%):
# 100 - (avg by(instance)(irate(node_cpu_seconds_total{mode="idle"}[5m])) * 100)
# Available memory (%):
# node_memory_MemAvailable_bytes / node_memory_MemTotal_bytes * 100
# Disk I/O utilization:
# irate(node_disk_io_time_seconds_total[5m]) * 100
# HTTP request rate (from nginx log exporter):
# rate(nginx_http_requests_total[5m])
Conclusion
Start with Grafana by importing community dashboards (ID 1193 for Linux servers from Node Exporter) before building your own. These community dashboards are built by practitioners and cover the important metrics with sensible thresholds. Create your own panels once you understand your specific monitoring needs. Configure dashboard alerting (Alerting > Alert rules) for critical thresholds, or use Prometheus Alertmanager for more sophisticated routing.
FAQ
Is Grafana Dashboards important for Ubuntu administrators?+
Yes. It supports practical Ubuntu administration because it connects directly to server reliability, security, troubleshooting, or daily operations.
Should I practice this on a live server?+
Use a lab VM first. After you understand the command output and rollback path, apply the workflow carefully on real systems.
What should I do after reading this article?+
Run the practice commands, write down what each one shows, and continue to the next article in the Ubuntu roadmap.
Need help with Ubuntu administration?
Work directly with Muhammad Irfan Aslam for Ubuntu Server, Linux, cloud, Docker, DevOps, CI/CD, or infrastructure troubleshooting support.
Hire Me for Support