Working with any IT project becomes much easier when the administrator has a wide range of metrics and monitoring data at their fingertips. It's even better when the data is presented in a clear and visual format. This is where tools like Grafana come in — an open-source solution designed to gather information from various sources and consolidate it into visual reports.
Grafana supports multiple platforms — Windows, macOS, Linux (including popular distributions like Debian, Ubuntu, CentOS, Fedora, OpenSuse, or RedHat). It can work with databases such as SQLite, MySQL, and PostgreSQL. With so many options, administrators rarely need to adapt the solution to their environment.
In this tutorial, we'll go over how to install Grafana, configure it, and work with dashboards.
When ordering a Linux VPS, users can install any Linux operating system. Usually, this is one of the common distributions like CentOS or Ubuntu. For this example, we'll assume the OS is already installed and ready for Grafana and other utility programs.
wget -q -O gpg.key https://rpm.grafana.com/gpg.key
sudo rpm --import gpg.key
Create a new official repository configuration:
sudo nano /etc/yum.repos.d/grafana.repo
Add the following content to the file:
[grafana]
name=grafana
baseurl=https://rpm.grafana.com
repo_gpgcheck=1
enabled=1
gpgcheck=1
gpgkey=https://rpm.grafana.com/gpg.key
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
Install the application:
sudo dnf install grafana
Enable autostart and launch Grafana:
sudo systemctl enable grafana-server
sudo systemctl start grafana-server
Check the status to ensure Grafana is running:
sudo systemctl status grafana-server
You should see a message confirming that the service is loaded and active. This step is especially useful if someone previously worked with the server or installed a custom Linux build with bundled utilities.
The process is similar: we install Grafana from the official repository after preparing the system to trust the source.
Run these commands:
wget -q -O - https://packages.grafana.com/gpg.key | sudo apt-key add -
sudo add-apt-repository "deb https://packages.grafana.com/oss/deb stable main"
sudo apt update
sudo apt install grafana
sudo systemctl enable grafana-server
sudo systemctl start grafana-server
sudo systemctl status grafana-server
By default, Grafana uses port 3000
. Here's how to open it in different firewalls.
For iptables:
Add the rule:
sudo iptables -A INPUT -p tcp --dport 3000 -m state --state NEW -j ACCEPT
Save the rules so they persist after reboot:
sudo service iptables save
Restart iptables to apply changes:
sudo systemctl restart iptables
For firewalld:
firewall-cmd --zone=public --add-port=3000/tcp --permanent
systemctl reload firewalld
Grafana uses the default login/password:
admin
admin
If forgotten, reset it with:
grafana-cli admin reset-admin-password --homepath "/usr/share/grafana" new_password
Grafana supports numerous data sources: Prometheus, Graphite, OpenTSDB, InfluxDB, and more. It also allows plugin installations to enhance functionality.
For example, to install the Zabbix plugin, run:
grafana-cli plugins install alexanderzobnin-zabbix-app
systemctl restart grafana-server
After restart, go to Configuration > Plugins and find Zabbix. After you enable it, you can configure it under Data Sources.
This same process applies to other plugins like Grafana PostgreSQL or Grafana Elasticsearch.
The core of Grafana is dashboards — sets of panels that visually display data. Users can create their own dashboards by clicking New Dashboard and selecting panel types.
Dashboard Types:
You can also display logs from external sources using Grafana Logs, and export/import dashboards for reuse.
For advanced control, refer to the official documentation. You can directly edit the grafana.ini
file to change:
Grafana is a powerful and flexible monitoring solution. To fully unlock its potential, experiment with dashboards, try manual config via grafana.ini
, and explore third-party plugins. As an actively developed project, Grafana remains one of the top data visualization and monitoring tools.