How to Install Grafana 7.2.0 Monitoring Tool on Ubuntu 20.04 LTS

Grafana is a free and open source enterprise-level monitoring and data visualization tool that can integrate with complex data from sources like Prometheus, Graphite, InfluxDB,  Elasticsearch and many more databases. Grafana lets you create alerts, notifications, and ad-hoc filters for your data while also making collaboration with your teammates easier through built-in sharing features. You can create your own dashboard to your own apps or infrastructure performance monitoring. In this tutorial, we will explain how to install Grafana 7.2.0 Monitoring Tool on Ubuntu 20.04 LTS.

On this article source, we will use the Grafana version 7.2.0 (the latest version when this article is being written) which was released on September 23, 2020.

grafana on ubuntu 20.04

The Grafana version 7.2.0 has several new features:

  • New date formatting options added
  • Field options are out of beta!
    • Added table column filters
    • New field override selection options
  • New transformations and enhancements
  • Drag to reorder queries
  • Inspect queries in Explore
  • $__rate_interval for Prometheus
  • Toggle parsed log fields
  • Sensitive alert channel settings are now encrypted
  • Grafana Enterprise features
    • Report time range
    • Organization-wide report settings
    • Report grid layout


  • Machine running Ubuntu 20.04 LTS
  • Non-root user with sudo privileges

Grafana Installation on Ubuntu 20.04 LTS

Let’s walk through the installation process of grafana 7.2.0 on Ubuntu 20.04 .

Add Grafana Repository

Add Grafana gpg key to the system, this step will enable us to install signed packages.

$  sudo apt-get install -y gnupg2 curl software-properties-common

$  curl | sudo apt-key add -

$  sudo add-apt-repository "deb stable main"

grafana on ubuntu 20.04

Installing Grafana

After adding Grafana repository, then you can update the Ubuntu system. Then initiate the installation of grafana.

$  sudo apt-get update

$  sudo apt-get -y install grafana

grafana on ubuntu 20.04

Enable Grafana Service

After installation has completed done, then you can enable and reload the Grafana service. Using following command you can accomplish this.

$  sudo systemctl daemon-reload

$  sudo systemctl enable grafana-server

$  sudo systemctl start grafana-server

Make sure grafana service is started by checking the status of the service using following command:

$  sudo systemctl status grafana-server

grafana on ubuntu 20.04

Verifying Grafana version

You can verify the Grafana version that is running on your system by using following command.

$  grafana-server -v

Version 7.2.0 (commit: efe4941ee3, branch: HEAD)

grafana on ubuntu 20.04

Open Port on Firewall

By default grafana uses http port on tcp port 3000. So you have to allow this port for enabling the access from external IP segment. You can use the Ubuntu ufw firewall utility to open port 3000/tcp.

$  sudo ufw status

$  sudo ufw enable

$  sudo ufw allow ssh

$  sudo ufw allow 3000/tcp

$  sudo ufw status

grafana installation on ubuntu 20.04

So far, we have configured all necessary steps for Grafana installation. The next step is testing whether the installation was successfully completed. We will hit the Grafana web console for the first time.

Accessing Grafana

We will access the Grafana dashboard by using its IP Address. The format is as follow http://ip_address:3000.

grafana installation on ubuntu 20.04

For the first time login,  use the below credentials

username : admin

password : admin

Then Grafana forces us to immediately change the password.

Using Prometheus Data Source

We already installed the Prometheus on the system, and now we will try to use the Prometheus as datasource in our fresh installed Grafana.

grafana on ubuntu 20.04

We used here Prometheus as datasource on tcp port 9090 as Grafana data source. Then we can explore if the data coming from Prometheus was already there, so easy to configure.

grafana on ubuntu 20.04


In this article we discussed how to install Grafana on Ubuntu 20.04 LTS and then we configure the Prometheus data source. For more new articles please visit regularly here.

Read Also : How to Add Remote Linux Host to Nagios Monitoring Server

Share on:

Ravindra Kumar

Hi, This is Ravindra. I am founder of TheCodeCloud. I am AWS Certified Solutions Architect Associate & Certified in Oracle Cloud as well. I am DevOps and Data Science Enthusiast.

Recommended Reading..

Leave a Comment