Install Grafana System Monitoring and Analytics Platform on Ubuntu 18.04 / 16.04 LTS

This brief tutorial shows students and new users how to install and configure Grafana monitoring and analytics platform on Ubuntu 16.04 / 18.04 LTS servers…

For those who don’t know about Grafana, is an open source software which provides monitoring and analytics across network systems and runs on all major operating systems, including Ubuntu…

Grafana is a complete enterprise grade server and log monitoring system which brings together data from diverse systems and databases into a single platform…

This post will show you how to perform a basic configuration after installation this open source project backed by a vibrant community… You’ll also be able to logon to Grafana server once installed…

For more about Grafana, please visit its homepage

When you’re ready, continue below with the steps:

Step 1: Install Grafana Package

To install Grafana, you can go and download its .deb package file and install it locally on Ubuntu server…. However, if you want to quickly and easily upgrade to newer versions of the software, you will want to add its official APT repository to Ubuntu…

To add its APT repository to Ubuntu, run the commands below to import its repository GPG key…

curl https://packages.grafana.com/gpg.key | sudo apt-key add -

After importing the repository key above, run the commands below to add its repository…

For its stable version, run the commands below:

echo "deb https://packages.grafana.com/oss/deb stable main" | sudo tee /etc/apt/sources.list.d/grafana.list

For its beta version, run the commands below… However, the beta version is not recommended for production so you’ll probably to use it in a non-production environment..

echo "deb https://packages.grafana.com/oss/deb beta main" | sudo tee /etc/apt/sources.list.d/grafana_beta.list

After adding the repository file above, run the commands below to update APT package list and install Grafana packages:

sudo apt update
sudo apt-get install apt-transport-https grafana

Once installed, the commands below can be used to stop, start and enable Grafana to automatically startup when the server boots up…

sudo systemctl stop grafana-server.service
sudo systemctl start grafana-server.service
sudo systemctl enable grafana-server.service

Step 2: Configure Grafana Service

Grafana default configuration files are located under /etc/default/grafana-server/ directory…. The main configuration file is /etc/grafana/grafana.ini and has a basic setup configured in it.. You’ll need to make some changes to suit your environment…

To validate if Grafana is installed, run the commands below:

systemctl status grafana-server.service

You should see Grafana system status details as shown below:

● grafana-server.service - Grafana instance
   Loaded: loaded (/usr/lib/systemd/system/grafana-server.service; enabled; vendor preset: enabled)
   Active: active (running) since Wed 2019-03-06 11:00:12 CST; 21s ago
     Docs: http://docs.grafana.org
 Main PID: 6985 (grafana-server)
    Tasks: 10 (limit: 4663)
   CGroup: /system.slice/grafana-server.service
           └─6985 /usr/sbin/grafana-server --config=/etc/grafana/grafana.ini --pidfile=/var/run/graf

Mar 06 11:00:12 ubuntu1804 grafana-server[6985]: t=2019-03-06T11:00:12-0600 lvl=info msg="Initializi
Mar 06 11:00:12 ubuntu1804 grafana-server[6985]: t=2019-03-06T11:00:12-0600 lvl=info msg="Initializi
Mar 06 11:00:12 ubuntu1804 grafana-server[6985]: t=2019-03-06T11:00:12-0600 lvl=info msg="Initializi
Mar 06 11:00:12 ubuntu1804 grafana-server[6985]: t=2019-03-06T11:00:12-0600 lvl=info msg="Initializi
Mar 06 11:00:12 ubuntu1804 grafana-server[6985]: t=2019-03-06T11:00:12-0600 lvl=info msg="Initializi
Mar 06 11:00:12 ubuntu1804 grafana-server[6985]: t=2019-03-06T11:00:12-0600 lvl=info msg="Initializi
Mar 06 11:00:12 ubuntu1804 grafana-server[6985]: t=2019-03-06T11:00:12-0600 lvl=info msg="Initializi
Mar 06 11:00:12 ubuntu1804 grafana-server[6985]: t=2019-03-06T11:00:12-0600 lvl=info msg="Initializi
Mar 06 11:00:12 ubuntu1804 grafana-server[6985]: t=2019-03-06T11:00:12-0600 lvl=info msg="HTTP Serve
Mar 06 11:00:12 ubuntu1804 grafana-server[6985]: t=2019-03-06T11:00:12-0600 lvl=info msg="cleanup of

Step 3: Access Grafana Web Portal

Now that Grafana server is installed and access is allowed from the local machine, use the address below to access Grafana portal…

http://localhost:3000

Then initial username and password are: admin and admin…. You’ll be prompted immediately upon entering to change the password… enter and confirm and new password and continue..

Grafana Ubuntu install

Enjoy!

Grafana ubuntu setup

That’s it!

Congratulations! You have learned how to install Grafana monitoring and analytics platform on Ubuntu 16.04 / 18.04 LTS servers…

You may also like the post below:

How to Install Elasticsearch Engine on Ubuntu 16.04 / 18.04

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.