Install latest Grafana on Debian 10

|
Last Updated:
|
|

In this tutorial, you will learn how to install latest Grafana on Debian 10. Grafana is an open source analytics and monitoring solution that enables you to query, visualize and alert on various systems metrics that can be pulled from various time series databases such as Graphite, InfluxDB & Prometheus etc.

Installing Grafana on Debian 10

There are various methods in which you can install Grafana. These include;

Install Grafana from Official Grafana APT repository

In this tutorial, we will discuss how to install Grafana from the Official Grafana APT repository. This is the surest way to ensure that you are running the latest Grafana on Debian 10.

Install Grafana Stable Release Repository

Run the command below to install Grafana stable release repository;

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

Install the Grafana repository signing key;

wget -q -O - https://packages.grafana.com/gpg.key | sudo apt-key add -

Run system package cache update;

apt update

Install Grafana;

apt install grafana

When installed, Grafana package;

  • Installs binary to /usr/sbin/grafana-server
  • Installs Init.d script to /etc/init.d/grafana-server
  • Creates default file (environment vars) to /etc/default/grafana-server
  • Installs configuration file to /etc/grafana/grafana.ini
  • Installs systemd service (if systemd is available) name grafana-server.service
  • The default configuration sets the log file at /var/log/grafana/grafana.log
  • The default configuration specifies a SQLite3 db at /var/lib/grafana/grafana.db
  • Installs HTML/JS/CSS and other Grafana files at /usr/share/grafana

Running Grafana on Debian 10

On systems with systemd init system, Grafana creates a systemd service, grafana-server.service.

In order to start Grafana on Debian 10, you first need to reload systemd daemon configurations;

systemctl daemon-reload

Next, you can start and enable Grafana service to run on system boot using the command below;

systemctl enable --now grafana-server

Checking the status;

systemctl status grafana-server.service
● grafana-server.service - Grafana instance
   Loaded: loaded (/lib/systemd/system/grafana-server.service; enabled; vendor preset: enabled)
   Active: active (running) since Sat 2021-04-03 02:58:17 EDT; 22s ago
     Docs: http://docs.grafana.org
 Main PID: 2025 (grafana-server)
    Tasks: 6 (limit: 2359)
   Memory: 17.4M
   CGroup: /system.slice/grafana-server.service
           └─2025 /usr/sbin/grafana-server --config=/etc/grafana/grafana.ini --pidfile=/var/run/grafana/grafana-server.pid --packaging=deb cfg:default.paths.logs=/var/log/g

Apr 03 02:58:39 debian grafana-server[2025]: t=2021-04-03T02:58:39-0400 lvl=info msg="Executing migration" logger=migrator id="create playlist table v2"
Apr 03 02:58:39 debian grafana-server[2025]: t=2021-04-03T02:58:39-0400 lvl=info msg="Executing migration" logger=migrator id="create playlist item table v2"
...

Accessing Grafana Web Interface

Grafana listens on port 3000/tcp on all interfaces by default;

ss -atlnp | grep 3000
LISTEN    0         128                      *:3000                   *:*        users:(("grafana-server",pid=2025,fd=11))

To be able to access it externally, you need to open this port on Firewall, if at all is running. Otherwise, just navigate to the browser and use the address http://<server-IP>:3000 to access your Grafana interface.

The default login credentials:

  • Username: admin
  • Password: admin
install grafana debian 10

When logged in with the default credentials, you will be prompted to change the password. Do so and proceed to Grafana web interface.

debian 10 grafana dashboard

Reference

Install Grafana on Debian

Other Tutorials

Integrate Prometheus with Grafana for Monitoring

Monitoring Gitlab Metrics with Prometheus and Grafana

Monitor OpenVPN Connections with Prometheus and Grafana

SUPPORT US VIA A VIRTUAL CUP OF COFFEE

We're passionate about sharing our knowledge and experiences with you through our blog. If you appreciate our efforts, consider buying us a virtual coffee. Your support keeps us motivated and enables us to continually improve, ensuring that we can provide you with the best content possible. Thank you for being a coffee-fueled champion of our work!

Photo of author
koromicha
I am the Co-founder of Kifarunix.com, Linux and the whole FOSS enthusiast, Linux System Admin and a Blue Teamer who loves to share technological tips and hacks with others as a way of sharing knowledge as: "In vain have you acquired knowledge if you have not imparted it to others".

Leave a Comment