How to Install Grafana on Ubuntu

What is Grafana?

An open source, cross-platform online application for interactive visualisation and analytics is called Grafana. When connected to supported data sources, it offers charts, graphs, and alerts for the web. Additionally, a licenced Grafana Enterprise edition with more features is accessible as a self-hosted installation or a Grafana Labs cloud service account. It can be expanded via a plug-in system. Using interactive query builders, end users may design sophisticated monitoring dashboards. The front end and back end of Grafana are each composed of TypeScript and Go code, respectively.

Grafana is a well-liked visualisation tool that is frequently combined with time series databases like InfluxDB, Prometheus, and Graphite, monitoring platforms like Sensu, Icinga, Checkmk, Zabbix, Netdata, and PRTG, SIEMs like Elasticsearch and Splunk, and other data sources in monitoring stacks. Version 3 of Kibana served as the foundation for the initial Grafana user interface.

An extension of a project at Orbitz, Grafana was initially made public in 2014 by Torkel degaard. It initially supported relational databases like MySQL, PostgreSQL, and Microsoft SQL Server but later expanded to support time series databases like InfluxDB, OpenTSDB, and Prometheus.

Grafana has the ability to bring serveral data sources together in one dashboard, with adding rows that will host individual panels that is each with visual type.

Grafana is continuous monitoring tool that will help you to visualise your real time data in an application, so you can visualise your data and understand how its working in real time.

Requirements

  • Fresh Installation of Ubuntu 20.04 Server
  • Root User Credentials 
  • Account in Grafana cloud(Optional)
  • Nginx(Optional, required when using reverse proxy)
  • HAProxy(Optional, required when using reverse proxy)

Steps to Install Grafana on Ubuntu 20.04 Server


Step 1: Update and Upgrade Repositories

sudo apt update && upgrade -y

Step 2: Enable root login

sudo sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config

Step 3: Restart ssh

sudo systemctl restart ssh

Step 4: Set password for root login, by default root password is not set

sudo passwd

Step 5: Login using root credentials

ssh root@ip-address


Step 6: Install adduser and libfontconfig1


apt install adduser libfontconfig -y


Step 7: Download Grafana deb file from grafana offical website

 wget https://dl.grafana.com/enterprise/release/grafana-enterprise_9.2.4_amd64.deb


Step 8: Install Grafana using dpkg

dpkg -i grafana-enterprise_9.2.4_amd64.deb


Step 9: Restart Grafana service

  • After  Installation of grafana service check the status of Grafana server as        

                systemctl status grafana-server or service grafana-server status

Grafan service status

  • Intially grafana server will inactive, so we need to start the grafana server

                systemctl start grafana-server

  • After starting the grafana server check the status again.

                systemctl status grafana-server or service grafana-server status

Grafan service status


Step 10: Login into Grafana using GUI

Use the system ip-address to login into Grafana as

10.0.14.240:3000

Grafana Login GUI
The Default login credential are

username and Password: admin & admin

Note: We can can change the password after login into Grafana.


Grafana DashBoard

Reference:

https://grafana.com/grafana/download/9.2.4?edition=enterprise&pg=get&plcmt=selfmanaged-box1-cta1

https://grafana.com/docs/grafana/latest/setup-grafana/installation/debian/