4. Grafana setup

4.1 Install Grafana

Download Grafana from their official website:

Since this example is based on Ubuntu OS, I will perform my installation accordingly:

root@deploymentmachine:/home#  id
uid=0(root) gid=0(root) groups=0(root)
root@deploymentmachine:/home# apt-get install -y adduser libfontconfig1
root@deploymentmachine:/home# wget https://dl.grafana.com/oss/release/grafana_7.3.7_amd64.deb
root@deploymentmachine:/home#  dpkg -i grafana_7.3.7_amd64.deb

Start the Grafana service with SystemD

root@deploymentmachine:/home# systemctl daemon-reload 
root@deploymentmachine:/home# systemctl enable grafana-server.service
root@deploymentmachine:/home# systemctl  start grafana-server.service

Change the admin password...

root@deploymentmachine:/home# grafana-cli admin reset-admin-password Str0nkPasswd
INFO[02-02|10:12:23] Connecting to DB                         logger=sqlstore dbtype=sqlite3
INFO[02-02|10:12:23] Starting DB migrations                   logger=migrator

Admin password changed successfully ✔

root@deploymentmachine:/home#

... and make sure you can log in: http://<publicIP>:3000

4.2 Grafana and Prometheus

Once you logged in go to Configuration > Data Sources > Add Data Sources. And select Prometheus

Provide here the Public IP of the host where Prometheus is running, along with port 9000:

Time to create dashboards for monitoring :)

Last updated