How to install and configure Grafana

Grafana is one of the best known open source tools for monitoring and obtaining information on multiple data sources. He is well known for his beautiful toolbars where they can be easily customized. It can provide amazing graphs and manage alerts to help the user take the right action.

Grafana supports a huge number of databases. The main use of Grafana is to display information from time series data such as CPU, memory and hard disk usage over time. But you can create all kinds of hosts (monitoring devices) and capture anything that can be measured. You can track datacenters, printers, routers, IoT devices, and more.

Another great benefit of this amazing software is that it is available for all operating systems, Linux, Mac and Windows. The community is actively working and developing many plugins to improve data visualization.

Graphical panel example

Requirements for Grafana

To run Grafana, you will need to guarantee minimum requirements such as a supported operating system, database, and browser.

Supported operating systems

Minimum equipment

  • Minimum recommended memory: 255 MB
  • Minimum Recommended Processor: 1

If you are going to use a lot of databases and dashboards, a more powerful computer is recommended.

Supported databases:

Grafana is flexible and supports many databases.

Supported databases in Grafana

Supported databases in Grafana

Supported web browsers:

The official documentation recommends using the following browsers to view the Grafana dashboard:

  • Chrome / Chromium
  • Firefox
  • Safari
  • Microsoft Edge

You can use other options as JavaScript is enabled. But as a precaution, use one from the list above.

Installing Grafana on Ubuntu or Debian

In this tutorial, we will show you how to install Grafana on an Ubuntu or Debian based system.

The easiest way is to download the latest Grafana as a .deb package. But in this case, your Gafana installation will not receive future updates and you will have to manually install a newer version.

This is why it’s best to add it to the list of repositories and then install the latest stable release. This way, your Grafana installation will receive regular updates.

In terminal add this command to use apt for https:

sudo apt-get install -y apt-transport-https

Now enable the software-properties-common package so you can add additional repositories:

sudo apt-get install -y software-properties-common wget

Use wget to get the GPG key and add it to your system:

wget -q -O - https://packages.grafana.com/gpg.key | sudo apt-key add -

Relaxing is easy. Update the software repository cache:

sudo apt-get update

And then install Grafana:

sudo apt-get install grafana

Now that you’ve installed Grafana, let’s see how to set it up correctly.

Setting up Grafana

Let’s start the Grafana service:

sudo systemctl daemon-reload
sudo systemctl start grafana-server

You should also enable this service so that Grafana starts at every system boot:

sudo systemctl enable grafana-server.service

Grafana works like a web service, so you need to access it from your browser. Open your browser and go to http: // localhost: 3000 /.

On the login page, use the default username and password. Use the device’s IP address if you are accessing Grafana on another computer on your network. 3000 is the default HTTP port. You can change it if you like.

  • username: admin
  • password: admin

Grafana login page

Grafana login page

It is highly recommended to create a new user with a strong password. After that, you can disable or remove the default administrator for security purposes.

Setting up your first panel

Before you start monitoring anything, you need to enable your database in the settings menu.

Add database to Grafana

Add database to Grafana

Once you’ve configured your data source, you’re ready to go ahead and design your dashboard.

It’s easy to create charts and indicators, you have many options and they are all well documented on the Grafana website. You just need to do a little research on this.

Grafana visualization

Grafana visualization

Now you need to use your creativity and create great dashboards.

Sidebar