Setup Grafana Metrics Prometheus Dashboard
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 Datasource --> Dashboards tab.
The Prometheus service, since it is local will, retrieve Grafana stats from the url http://127.0.0.1:3000/metrics
Grafana will return metrics data by default.
You can verify or change the settings in the
Scroll down and find the metrics settings and ensure they are set as
1 2 3 4 5 6
Optionally, you can also set the authentication settings of the
If you changed the
grafana.ini, then you will need to restart the Grafana service.
The Grafana metrics will be visible at url
Add a new scrape target to the Prometheus configuration.
Scroll down and add a new job to the
1 2 3 4 5 6 7 8 9 10
Save and restart the Prometheus service
Go back into Grafana, and there is likely to be some issues with the visualizations.
In the video, I fix each problem in turn and demonstrate my problem solving process.
Note that depending on the versions of Grafana and Prometheus, you may see different results. My problem solving process should hopefully help you to resolve your particular issues.
/metrics endpoint could be accessed remotely, I also created a new Nginx location in my site config to deny access to the
/metrics url path. Note that this does not prevent calling the
/metrics endpoint locally, just externally via the Nginx reverse proxy. So the local
prometheus service is still able to call the Grafana metrics endpoint.
1 2 3 4 5
After changing any Nginx configs, verify the configs are ok using,
and the restart, and check status.