Devops : Grafana Introduction

Iverique
4 min readApr 26, 2024

--

Source: https://www.skedler.com/blog/wp-content/uploads/2021/08/grafana-logo.png

What is Grafana?

“Grafana is a multi-platform open source analytics and interactive visualization web application. It can produce charts, graphs, and alerts for the web when connected to supported data sources.” [2]

It is a monitoring platform used widely for visualizing time-series data. It is known for its flexibility, powerful features, and user-friendly interface. In this article, we will walk through the steps to install Grafana on various platforms and get you started with creating dashboards for your data.

Installation on Linux (Ubuntu/Debian):

You can visist this to check the lastest version or other distributions:

1. Update APT :

sudo apt update

2. Install Grafana:

sudo apt-get install -y adduser libfontconfig1 musl
wget https://dl.grafana.com/enterprise/release/grafana-enterprise_10.4.2_amd64.deb
sudo dpkg -i grafana-enterprise_10.4.2_amd64.deb
Installing Grafana required packages
Getting Grafana enterprise 10.4.2
Installing required packages

3. Start and Enable Grafana Service:

sudo systemctl start grafana-server
sudo systemctl enable grafana-server
Checking status and starting Grafana daemon service

4. Access Grafana:

Open your web browser and visit `http://localhost:3000`. Log in with the default credentials (admin/admin) and follow the on-screen instructions to change the password.

Accessing site using CURL

5. Use Reverse Proxy to Serve your Application

Nginx configuration for Grafana
Grafana first time access
Grafana Login Page

You can check articles on Nginx and Apache:

You should see this login page if you go to /login:

Grafana login page

An other alternative to this installation is to use a docker container which can be discussed in another article.

Getting Started with Grafana:

0. First Time Login:

You can follow the documentation to sign in to Grafana:

For the first time, you can use admin for username and password.

First time login
First time changing admin password
Home page
  1. Data Sources:
    Connect Grafana to your data sources like Prometheus, InfluxDB, MySQL, or others. Go to Configuration > Data Sources to add and configure data sources.
Grafana data sources

2. Create Dashboards:
Click on the “+” icon on the left sidebar and select “Dashboard.” Add panels to your dashboard and configure them to display the data you want.

Grafana Dashboards
Example of dashboard
Example of Grafana panels
Dashboard example

3. Explore Plugins:
Grafana has a rich plugin ecosystem. Explore and install plugins from the Plugin section to extend Grafana’s functionality.

Example of Explore page

4. Share and Collaborate:
Share your dashboards with colleagues or the public. Grafana provides options to share snapshots, create links, and set permissions for users.

5. Alerting:
Set up alerts based on your data thresholds. Define alert rules and notifications to stay informed about important changes in your metrics.

Example of Alert rules

6. Explore Grafana Labs:
Visit Grafana Labs for tutorials, documentation, and community support. Join forums, attend webinars, and contribute to the Grafana community.

References:

[1] “Dashboards,” Grafana Labs. Available: https://grafana.com/grafana/dashboards/

[2] “Grafana,” Wikipedia, Dec. 31, 2021. Available: https://en.wikipedia.org/wiki/Grafana

[3] “Grafana: The open observability platform,” Grafana Labs, 2020. Available: https://grafana.com

More stories:

--

--