Grafana is an open-source monitoring and visualization tool that can be used to monitor the performance and health of various systems and services. In this article, we will go over the steps for installing Grafana 8 on a fresh installation of Debian 11.
Before we begin, make sure you have a user that has sudo privileges on your Debian 11 system.
To start, we need to add the Grafana repository to our system. First, add the GPG key for the Grafana repository by running the following command:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0A55DEB6
Next, add the Grafana repository to the /etc/apt/sources.list file:
echo "deb <https://packages.grafana.com/oss/deb> stable main" | sudo tee /etc/apt/sources.list.d/grafana.list
After adding the repository, update the package index by running the following command:
sudo apt-get update
Install Grafana
To install Grafana, run the following command:
sudo apt-get install -y grafana
After the installation is complete, start the Grafana service and enable it to start automatically on boot:
sudo systemctl start grafana-server
sudo systemctl enable grafana-server
Access Grafana
After the installation is complete, you can access Grafana by visiting the URL http://your-server-ip:3000 in a web browser. You will be prompted for the username and password for the Grafana administrator account. The default username is admin, and the default password is admin.
Once you are logged in, you will see the Grafana dashboard, which provides an overview of the metrics and data collected by your monitored systems and services. The dashboard allows you to create and customize visualizations and dashboards to suit your specific needs. You can also use Grafana to set up alerts and notifications to be notified when certain conditions are met. Overall, Grafana is a powerful and user-friendly tool for monitoring and visualizing your data.
Configure the firewall
If you have a firewall enabled on your system, you will need to allow access to the Grafana port (3000) in order to access it from a remote machine.
To do this, run the following commands to open port 3000 and reload the firewall rules:
sudo ufw allow 3000/tcp
sudo ufw reload
Conclusion
In this article, we went over the steps for installing Grafana 8 on a fresh installation of Debian 11. We added the Grafana repository, installed Grafana, and accessed the Grafana dashboard. We also covered how to configure the firewall to allow access to Grafana.
I hope this tutorial has been helpful for you. Happy monitoring!