Monitoring

Host Grafana + Prometheus on VeloxaHost

Prometheus collects and stores time-series metrics, and Grafana turns them into dashboards and alerts. This stack is for developers and operators who want to see CPU, memory, disk and network use across their own servers, without sending the data to a hosted monitoring service.

The one-click install runs three services on one Ubuntu 24.04 server: Prometheus on port 9090, the Prometheus node exporter on port 9100, and Grafana on port 3000. Prometheus is set to scrape itself and the node exporter every 15 seconds.

Install it yourself

  1. Install Prometheus and the node exporter from Ubuntu's own packages. Both start as services right away, and Ubuntu's default config already scrapes Prometheus itself and the node exporter on localhost:9100.

    apt update && apt install -y prometheus prometheus-node-exporter
    
  2. Add Grafana's signing key from its official APT repository.

    mkdir -p /etc/apt/keyrings
    wget -O /etc/apt/keyrings/grafana.asc https://apt.grafana.com/gpg-full.key
    chmod 644 /etc/apt/keyrings/grafana.asc
    
  3. Add the stable Grafana repository.

    echo "deb [signed-by=/etc/apt/keyrings/grafana.asc] https://apt.grafana.com stable main" | tee /etc/apt/sources.list.d/grafana.list
    
  4. Install Grafana OSS and start it.

    apt update && apt install -y grafana
    systemctl daemon-reload && systemctl enable --now grafana-server
    
  5. Forward a port in the server's block on the shared IPv4 to port 3000 from the server's page in the console, then open http://<shared-ip>:<public-port> and sign in as admin / admin. Grafana asks you to set a new password on first login.

  6. In Grafana, go to Connections > Data sources, add a Prometheus data source with the URL http://localhost:9090, and save. Then import a node exporter dashboard, for example ID 1860 ("Node Exporter Full") from grafana.com.

  7. Prometheus and the node exporter have no login. Allow ports 9090 and 9100 only from addresses you trust, or keep them closed and reach them through Grafana.

    ufw allow 3000/tcp && ufw allow OpenSSH && ufw enable
    

FAQ

What licences do Grafana and Prometheus use?

Grafana is licensed under the GNU AGPLv3. Prometheus and the node exporter are licensed under Apache 2.0. Running them unmodified for your own monitoring places no extra obligations on you; the AGPL matters if you modify Grafana and offer it to others over a network.

Is Prometheus already connected to Grafana after a one-click deploy?

No. The install starts all three services and points Prometheus at itself and the node exporter, but Grafana starts with no data sources. Add Prometheus as a data source at http://localhost:9090, then import or build a dashboard.

Where is the data stored, and for how long?

Prometheus keeps its database in /var/lib/prometheus and, by default, keeps 15 days of samples; change that with the --storage.tsdb.retention.time flag. Grafana keeps its dashboards, users and settings in /var/lib/grafana. More scrape targets or a longer retention means more disk, so watch disk use as you add servers.

How do I upgrade?

Grafana comes from Grafana's APT repository, so apt update && apt upgrade updates it. The one-click install places Prometheus 2.51.0 and node exporter 1.7.0 as standalone binaries in /usr/local/bin, so you upgrade those by replacing the binaries with a newer release and restarting the services. Take a snapshot first so you can roll back.

Can I add memory if Prometheus needs more?

Yes. VeloxaHost resizes CPU and memory of a running container from the server page, and the change applies without a restart. Prometheus memory grows with the number of time series it holds, so adding targets is the usual reason to resize.

Which VeloxaHost plan fits this stack?

The recommended size here, 2 vCPU and 4 GB of RAM with 40 GB of disk, fits the Veloxa 2 VPS size: 2 vCPU, 4 GB RAM and 80 GB disk for $20 a month, billed hourly and capped at that price. It also fits inside the 14-day trial allowance of 2 vCPU, 4 GB RAM and 40 GB of disk.