In this chapter we are going to deploy a beatiful front end to plot our metrics called Grafana.
Grafana is a multi-platform open source analytics and interactive visualization package. It provides charts, graphs, and alerts for the web when connected to supported data sources. Expandable through a plug-in system, end users can create complex monitoring dashboards using interactive query builders.

Table of contents

  1. Installing Grafana
  2. Starting Grafana
  3. Creating a Dash board

Installing Grafana

Let's start installing the stuff in our monitoring server machine:

root@monitor:~# wget
root@monitor:~# dpkg -i grafana_6.4.1_amd64.deb

And let's have a look to its configuration file:

root@monitor:~# vim /etc/grafana/grafana.ini

There is an huge amount of config parameters and most of them are commented out. We will leave it like this. But I strongly recommend you to edit the smtp email server section. Your Grafana server will need it to create new users and to send alerts. The rest of configuration will be done at the GUI.

Starting Grafana

So start the systemd service and browse there:

root@monitor:~# systemctl start grafana-server


Once you first login ( admin / admin ) you will be able to add your first data souce.

Conect Grafana to Prometheus

Add your localhost Prometheus as a new data source:

Creating a Dash board

Let's create a new Dash board for our first Query and Graph visualization. We are using the same Metric query we already used before. Click Query and write this in Metrics field:

Left control buttons will guide you through the process of creating your first graph. By now we will leave it everything as default. Save your creation with the disc icon on the top and see how your dashboard looks like.

Now is time for you to explore how many metrics and interestig ways of representing them there are in that beatiful GUI.