Skip to content

Basic configuration

Quickly deploy minimal Prometheus and Grafana instances.

As usual, this is for Debian using APT.

Sources⚓︎

Requirements⚓︎

None.

Guide⚓︎

Prometheus basics⚓︎

Install Prometheus
apt install prometheus

Check that there is at least one job_name entry under scrape_configs in /etc/prometheus/prometheus.yml.

Start Prometheus with its default config file
cd /etc/prometheus/
./prometheus --config.file=prometheus.yml

Check that data is being served on http://localhost:9100.

Grafana basics⚓︎

Install Grafana
apt install grafana
Start grafana
systemctl start grafana-server

The web interface should come online at http://localhost:3000. There, navigate the left menu to Connections > Data sources.

Select "Add data source" and "Prometheus".

Everything can be kept as default, the address of the Prometheus server is http://localhost:9090 (and not :9100).

Next, you can navigate to Explore > Metrics in the left menu and press "Let's start!". This should show every metric that was found on the prometheus server.

Metrics refresh

I couldn't find how to refresh metrics. Once the initil connexion is done, I don't see a way to scan for aditional metrics or changes in the description of existing ones.

If you plan on adding aditional metrics, I recommend to do that before connecting Grafana.