Skip to content

Setup Grafana Metrics Prometheus Dashboard

Video Lecture

Setup Grafana Metrics Prometheus Dashboard Setup Grafana Metrics Prometheus Dashboard

 (Pay Per View)

You can use PayPal to purchase a one time viewing of this video for $1.49 USD.

Pay Per View Terms

  • One viewing session of this video will cost the equivalent of $1.49 USD in your currency.
  • After successful purchase, the video will automatically start playing.
  • You can pause, replay and go fullscreen as many times as needed in one single session for up to an hour.
  • Do not refresh the browser since it will invalidate the session.
  • If you want longer-term access to all videos, consider purchasing full access through Udemy or YouTube Memberships instead.
  • This Pay Per View option does not permit downloading this video for later viewing or sharing.
  • All videos are Copyright © 2019-2025 Sean Bradley, all rights reserved.

Description

Depending on your Grafana and Prometheus versions, the pre-built Grafana Metrics dashboard may partly work or not at all.

In this video, I will show the steps that I used to get it to work.

Install the Grafana Metrics dashboard from the Prometheus Data SourceDashboards tab.

The Prometheus service, since it is local will, retrieve Grafana stats from the URL http://127.0.0.1:3000/metrics

We need to add a scrape target into the Prometheus configuration for a job called grafana

#
nano /etc/prometheus/prometheus.yml

Scroll down and add a new job name grafana to the scrape_configs section.

# // existing config
- job_name: grafana
  static_configs:
      - targets: ['localhost:3000']

Save and restart the Prometheus service

service prometheus restart
service prometheus status

Go back into the Grafana UI, Open the Explore tab, select the Prometheus data source and filter by job and there should be a new job named grafana

Now going back into the imported Grafana Metrics dashboard, you will begin to see some data after a few minutes.

Grafana Metrics Endpoint

Grafana will return metrics data by default.

You can verify or change the settings in the grafana.ini file.

#
nano /etc/grafana/grafana.ini

Scroll down and find the metrics settings and ensure they are set as

# Metrics available at HTTP API Url /metrics
[metrics]
# Disable / Enable internal metrics
enabled             = true
# Disable total stats (stat_totals_*) metrics to be generated
disable_total_stats = false

Optionally, you can also set the authentication settings of the metrics endpoint.

basic_auth_username =
basic_auth_password =

If you changed the grafana.ini, then you will need to restart the Grafana service.

#
#
service grafana-server restart
service grafana-server status

The Grafana metrics will be visible at URL http://localhost:3000/metrics.