Grafana
Grafana is an open-source observability platform for visualising metrics, logs, and traces. It connects to data sources such as InfluxDB, Prometheus, Elasticsearch, and MySQL, and renders them as interactive dashboards with alerting. It is widely used for infrastructure monitoring, application performance tracking, and business intelligence.
Software included
Section titled “Software included”| Component | Version |
|---|---|
| Grafana OSS | Latest stable |
| Ubuntu | 24.04 LTS |
Getting started
Section titled “Getting started”1. Connect to your VM
Section titled “1. Connect to your VM”ssh ubuntu@<your-vm-ip>2. Verify Grafana is running
Section titled “2. Verify Grafana is running”There is no first-boot configuration. Grafana starts immediately after the VM boots.
systemctl status grafana-server3. Access the Grafana UI
Section titled “3. Access the Grafana UI”Open a browser and navigate to:
http://<your-vm-ip>:3000Log in with the default credentials:
| Field | Value |
|---|---|
| Username | admin |
| Password | admin |
You will be prompted to set a new password on first login.
4. Add a data source
Section titled “4. Add a data source”Once logged in:
- Go to Connections → Data sources
- Click Add data source
- Select your data source type (InfluxDB, Prometheus, MySQL, etc.)
- Enter the connection details and click Save & test
Managing Grafana
Section titled “Managing Grafana”# Check service statussystemctl status grafana-server
# Restartsudo systemctl restart grafana-server
# View logssudo journalctl -u grafana-server -f| Path | Purpose |
|---|---|
/etc/grafana/grafana.ini | Main configuration |
/var/lib/grafana/ | Dashboards, plugins, and database |
Security
Section titled “Security”Port 3000 is accessible on the VM’s network interface. UFW is enabled and allows SSH (port 22) only by default.
To allow browser access from a specific IP:
sudo ufw allow from <trusted-ip> to any port 3000To access the UI without opening the firewall, use an SSH tunnel:
# Run this on your local machinessh -L 3000:localhost:3000 ubuntu@<your-vm-ip>
# Then open in browserhttp://localhost:3000For production use, place Grafana behind a reverse proxy such as Nginx or Caddy so you can serve it on port 443 with a TLS certificate.