This article is going to teach you how to Integrate Prometheus with Grafana for Monitoring. Grafana is a cross-platform web-based analytics and interactive visualization software. It generates web-based charts, graphs, and alerts when connected to compatible data sources. It’s widely used with time series databases like InfluxDB, Prometheus, and Graphite, as well as monitoring platforms like Sensu, Icinga, Checkmk, Zabbix, Netdata, and PRTG, SIEMs like Elasticsearch, and other data sources.
Prometheus is a free software tool for event monitoring and alerting. It stores real-time metrics in a time series database with configurable searches and real-time alerting using an HTTP pull mechanism. We will integrate Prometheus with Grafana for Monitoring using Ubuntu, check out our previous article on how to Install Grafana on Ubuntu 22.04 and how to Install Prometheus on Ubuntu 22.04.
How to Integrate Prometheus with Grafana for Monitoring
- To integrate Prometheus with Grafana, start by opening Grafana dashboard and click on Data sources as shown below.
- You’ll see a list of data sources you can use. Simply select the Prometheus option.
- Fill up the URL text area with the Prometheus server address e.g.
localhost:9090then scroll down and click Save & Test button to update your settings. If all is well you will gate a notification saying Data source is working.
- Click the + sign on the left sidebar and select ‘import’ to build a dashboard for visualizing stats.
- You will be required to enter dashboard ID to load.
- Next, open official Grafana dashboard website and select dashboard of your choice by clicking it. In my case I will select Node Exporter Full.
- You will be taken to the next page where you can copy the dashboard ID.
- Go back to your Grafana Import tab and paste the ID you copied then click Load button to procced.
- Select Prometheus and click import after pasting the ID.
- Grafana will start retrieving metrics from the Prometheus server and displaying them.
- You can scroll down and select specific module to display.
- You have reached the end of the article, Congratulations. You have learned how to Integrate Prometheus with Grafana for Monitoring.
Read more on Prometheus Documentation
Install Grafana on Ubuntu 22.04
Install Prometheus on Ubuntu 22.04