Deploy Grafana on Ubuntu to visualize metrics, logs, and traces from any data source — the standard dashboard platform for Prometheus, Loki, and the entire observability stack.
Grab the automated bash script from GitHub to follow along with the video.
wget https://raw.githubusercontent.com/mhmdali94/Docker/main/monitoring/grafana/grafana-ubuntu.sh
chmod +x grafana-ubuntu.sh
sudo bash grafana-ubuntu.sh
wget https://raw.githubusercontent.com/mhmdali94/Docker/main/monitoring/grafana/grafana-ubuntu.sh
chmod +x grafana-ubuntu.sh
The script installs Docker if needed, then deploys Grafana with persistent storage for dashboards and data source configurations.
sudo bash grafana-ubuntu.sh
Open your browser and navigate to:
http://<your-server-ip>:3000
Go to Connections → Data Sources → Add your first data source (Prometheus, Loki, InfluxDB, or others) to start building dashboards.
| Port | Purpose |
|---|---|
| 3000 | Grafana Web UI |
Grafana is the world's most popular open-source monitoring visualization platform. It connects to over 100 data sources — Prometheus, Loki, InfluxDB, MySQL, PostgreSQL, Elasticsearch, and many more — and lets you build beautiful, interactive dashboards without writing code. From server metrics to business KPIs, Grafana is the visualization layer of nearly every modern self-hosted monitoring stack.
Grafana transforms raw metric numbers into actionable visual dashboards. Instead of SSH-ing into servers to check CPU usage, you get a live panel showing the last 7 days of metrics for all your servers on one screen. The 5,000+ community dashboards mean you can import a production-grade dashboard for Node Exporter or Kubernetes in 30 seconds.
Grafana listens on port 3000. Open this port to your local network for team access. For external access, use Nginx Proxy Manager with SSL. Data source ports (Prometheus 9090, Loki 3100) should remain internal — Grafana queries them from within the Docker network.
Netdata (auto-discovery, no config, simpler), Uptime Kuma (uptime focus, not metrics), Kibana (Elasticsearch-only), Datadog (managed, expensive). Grafana is the universal standard — use it whenever you have a data source and want a visualization layer.
Grafana is a visualization layer — it needs a data source. Without Prometheus or another metrics backend, Grafana has nothing to show. If you want zero-configuration server monitoring with auto-discovery, start with Netdata instead and add Grafana later when you need custom dashboards.
PrismaTechWork provides end-to-end infrastructure services — from initial deployment and security hardening to ongoing monitoring, automated backups, and dedicated support. Whether you need a single-server setup or a multi-site network, our team ensures your infrastructure is built right, secured properly, and maintained reliably.
Prometheus collects and stores metrics (the data layer). Grafana visualizes them (the presentation layer). Prometheus answers 'what happened?' with raw numbers. Grafana answers 'show me a graph of what happened.' They are always deployed together — neither is complete without the other.
Yes, Grafana Open Source is completely free and Apache-licensed. Grafana Cloud offers a managed hosted version with a generous free tier. Grafana Enterprise adds SSO, audit logging, and report generation for a fee. For self-hosted use, the free OSS version has everything you need.
Go to Dashboards → Import in Grafana, enter the dashboard ID from grafana.com/grafana/dashboards (e.g. 1860 for Node Exporter Full), select your Prometheus data source, and click Import. You get a professional dashboard in under a minute.
Yes. Add MySQL or PostgreSQL as a data source in Grafana. You can then write SQL queries in panel editors to visualize any data stored in your database — user counts, order volumes, error rates, or any other business metric.
Yes. Grafana Alerting works with any data source that supports time-series queries — Loki, InfluxDB, MySQL, Elasticsearch, and others. You define an alert rule pointing at a specific panel query, set a condition, and configure a notification channel.
Create user accounts with Viewer or Editor roles in Grafana. Viewers can see all dashboards but not edit them. Editors can create and modify dashboards. Admins can manage users and data sources. For larger organizations, use LDAP or OAuth to sync team permissions automatically.
Variables are dynamic filters on dashboards — for example, a `$host` variable that shows a dropdown of all monitored servers. Every panel uses `$host` in its query, so selecting a different server from the dropdown instantly updates all panels. This makes one dashboard reusable across all your servers.
Run `docker compose pull && docker compose up -d`. Grafana's database (dashboards, users, data sources) is stored in a persistent volume and is not affected by image updates. For major version upgrades (e.g. 9.x to 10.x), read the migration guide — some plugin APIs changed.