How To Install Grafana on Ubuntu 24.04

In this short guide we will perform the installation of Grafana on Ubuntu 24.04 Linux system. Grafana is a good open source solution for visualizing metrics collected from different data sources. With Grafana you can perform creation of interactive dashboards and display graphs and other visualizations that makes it easy to analyze and understand your system performance better.

Grafana supports data collection from a wide range of data sources such as MariaDB, PostgreSQL, Prometheus, InfluxDB as well as cloud platforms like Azure Monitor and AWS CloudWatch, and much more. For most users it’s easy to get started since there are plenty of built-in bar charts, line graphs, gauges, pie charts that can be customized for an easy start.

Alerts and notifications can be performed based on anomalies or triggered by data thresholds for prompt response. For collaborative efforts in monitoring, Grafana allows you to share dashboards with colleagues who can analyze and respond to issues accordingly. Access control and permissions for secure data sharing can be performed by Grafana Administrator.

Add Grafana Repository

The Grafana development team provides official APT repository for Debian based systems. We can add this repository and ensure the latest release of Grafana is installed on our Ubuntu 24.04 system.

Perform an update of the system OS packages list.

sudo apt update

Optionally do an upgrade on all system packages.

sudo apt upgrade -y 
[ -e /var/run/reboot-required ] && sudo reboot

Once this is done, install dependency packages required.

sudo apt install wget apt-transport-https software-properties-common -y

Import GPG key used is signing packages distributed in the repository.

sudo mkdir -p /etc/apt/keyrings/
wget -q -O - https://apt.grafana.com/gpg.key | gpg --dearmor | sudo tee /etc/apt/keyrings/grafana.gpg > /dev/null

After the repository key has been imported, we can add the Grafana APT repository.

echo "deb [signed-by=/etc/apt/keyrings/grafana.gpg] https://apt.grafana.com stable main" | sudo tee -a /etc/apt/sources.list.d/grafana.list

Install Grafana package

Now that we have added the repository, let’s proceed to install Grafana package.

sudo apt update && sudo apt install grafana

Ensure grafana service is started and set to start at system boot using systemctl command.

sudo systemctl enable --now grafana-server.service

Grafana configuration file is located at /etc/grafana/grafana.ini.

Data is store in the /var/lib/grafana/ directory.

Secure with SSL Certificates

You can configure secure access using domain name and SSL certificates.

$ sudo vim /etc/grafana/grafana.ini
protocol = https # Allows https
domain = grafana.example.com # replace with your FQDN

# https certs & key file
cert_file = /etc/letsencrypt/live/grafana.example.com/fullchain.pem
cert_key = /etc/letsencrypt/live/grafana.example.com/privkey.pem

You can then restart grafana server.

sudo systemctl restart grafana-server.service

Access Grafana UI

Access Grafana Web UI on http://ServerIP:3000

The default login username and password is admin.

Note that you are required to change the password after login. You now have Grafana installed and working on an Ubuntu 24.04 Linux machine. Enjoy monitoring with Grafana and access Grafana official documentation pages for detailed usage guide.

Your IT Journey Starts Here!

Ready to level up your IT skills? Our new eLearning platform is coming soon to help you master the latest technologies.

Be the first to know when we launch! Join our waitlist now.

Join our Linux and open source community. Subscribe to our newsletter for tips, tricks, and collaboration opportunities!

Recent Post

1 thought on “How To Install Grafana on Ubuntu 24.04”

Leave a Comment

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

Related Post

The web browser is the key arsenal that we use to browse the internet. If you want to access information […]

In this guide,we will look at how you can install Java 11 on Oracle Linux 8. Java is a widely […]

The adoption of Containers and microservice architectures has been amazing and speedy in the past few years. Docker is widely […]

Let's Connect

Unleash the full potential of your business with CloudSpinx. Our expert solutions specialists are standing by to answer your questions and tailor a plan that perfectly aligns with your unique needs.
You will get a response from our solutions specialist within 12 hours
We understand emergencies can be stressful. For immediate assistance, chat with us now

Contact CloudSpinx today!

Download CloudSpinx Profile

Discover the full spectrum of our expertise and services by downloading our detailed Company Profile. Simply enter your first name, last name, and email address.