fbpx

Generally speaking, Prometheus is good, after all he was a titan, created humanity, gave us fire. And the other Prometheus is also good however we need a way to visualize it. Currently the official recommendation is to use Grafana. Prometheus has a plugin for this that can be configured as a data source.

Prometheus comes with its own sets of limitations, like trending which requires metric data that is stored in Prometheus to be prepared in such a way that increases human readability. Looking at a Table getting filled with numbers overtime does not provide a neat overview of the overall system metrics, but on the other hand, a graph that was made with the same data will be easy to understand and draw conclusions from.

Enter Grafana which specializes in the graphical display of values from various tools and now supports a large number of data sources. Grafana is modular by nature, you can decide what you want to be displayed, and how, and the graphs you want to combine. This is done on Dashboards, enough talking now let’s configure a Dashboard for our Prometheus server that we configured previously.

To setup Prometheus and Node exporter metrics, please follow the below tutorials.

  1. Setup Prometheus on Linux
  2. Setup Node Exporter

Install and Configure Grafana Centos/Redhat

1. To get the latest rpm download visit the official downloads page and download it using wget.

wget https://dl.grafana.com/oss/release/grafana-7.1.1-1.x86_64.rpm

2. Install the rpm.

yum -y install grafana-7.1.1-1.x86_64.rpm

Configure Grafana

1. Start and enable the grafana server.

systemctl start grafana-server

systemctl enable grafana-server

2. Access grafana UI on port 3000.

http://<system_IP>:3000

The default username and password is admin,admin. You will be prompted to change the default passsword.

Add Prometheus Source To Grafana

Note: Make sure your Prometheus endpoint should be accessible from Grafana server before proceeding further.

1. Click the “add source” option from the Grafana homepage.

2. Add the source name, Prometheus endpoint details and save it.

Click on Select

3. After giving the values, click on “Save & Test”, it might take some time depending on your infrastructure.

Wait till you get this message, “Data source is working.”

Create Dashboards From Prometheus Source

1. After the above Steps. Select Dashboards right next to Settings tab.

2 Import any of the Dashboards that you want. For this tutorial I am using “Prometheus 2.0 Stats”

3. Then click on search and search the imported Dashboard.

This is how it should appear at in your browser.

If you are able to view a similar dashboard as above, Cheers! You have configured Grafana with Prometheus successfully.


0 Comments

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.