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.
1 thought on “How To Install Grafana on Ubuntu 24.04”
Thanks nice article.