Welcome to our guide on how to Install Grafana on Fedora 37/36/35/34/33/32. Grafana is the leading open source feature-rich metrics dashboard and graph editor for Graphite, Elasticsearch, OpenTSDB, Prometheus, and InfluxDB. Grafana provides charts, graphs, and alerts for the web when connected to supported data sources.
This tutorial will guide you through the installation of Grafana on Fedora.
For CentOS / Ubuntu, use:
Install Grafana on Fedora 37/36/35/34/33/32
Grafana is available from the upstream YUM repository though you can also install it from an RPM package.
Step 1: Add Grafana yum repository:
Run the following commands to add Grafana YUM repository into your Fedora system.
cat <<EOF | sudo tee /etc/yum.repos.d/grafana.repo
[grafana]
name=grafana
baseurl=https://packages.grafana.com/oss/rpm
repo_gpgcheck=1
enabled=1
gpgcheck=1
gpgkey=https://packages.grafana.com/gpg.key
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
EOF
Step 2: Install Grafana on Fedora
The install Grafana on Fedora by running:
sudo dnf -y install grafana
To start grafana service and enable it to start on boot, run:
sudo systemctl start grafana-server
sudo systemctl enable grafana-server
Confirm service state:
$ systemctl status grafana-server
● grafana-server.service - Grafana instance
Loaded: loaded (/usr/lib/systemd/system/grafana-server.service; enabled; preset: disabled)
Active: active (running) since Wed 2023-01-25 13:16:31 UTC; 2s ago
Docs: http://docs.grafana.org
Main PID: 2061 (grafana-server)
Tasks: 14 (limit: 4543)
Memory: 49.8M
CPU: 2.041s
CGroup: /system.slice/grafana-server.service
└─2061 /usr/sbin/grafana-server --config=/etc/grafana/grafana.ini --pidfile=/var/run/grafana/grafana-server.pid --packaging=rpm cfg:default.paths.logs=/var/log/grafana cfg:default.path>
Jan 25 13:16:31 fedora.mylab.io grafana-server[2061]: logger=server t=2023-01-25T13:16:31.830970201Z level=info msg="Writing PID file" path=/var/run/grafana/grafana-server.pid pid=2061
Jan 25 13:16:31 fedora.mylab.io grafana-server[2061]: logger=provisioning.alerting t=2023-01-25T13:16:31.831687504Z level=info msg="starting to provision alerting"
Jan 25 13:16:31 fedora.mylab.io grafana-server[2061]: logger=provisioning.alerting t=2023-01-25T13:16:31.83171451Z level=info msg="finished to provision alerting"
Jan 25 13:16:31 fedora.mylab.io systemd[1]: Started grafana-server.service - Grafana instance.
Jan 25 13:16:31 fedora.mylab.io grafana-server[2061]: logger=http.server t=2023-01-25T13:16:31.838843674Z level=info msg="HTTP Server Listen" address=[::]:3000 protocol=http subUrl= socket=
Jan 25 13:16:31 fedora.mylab.io grafana-server[2061]: logger=ngalert.state.manager t=2023-01-25T13:16:31.839930057Z level=info msg="Warming state cache for startup"
Jan 25 13:16:31 fedora.mylab.io grafana-server[2061]: logger=ngalert.state.manager t=2023-01-25T13:16:31.841920874Z level=info msg="State cache has been initialized" states=0 duration=1.986324ms
Jan 25 13:16:31 fedora.mylab.io grafana-server[2061]: logger=ticker t=2023-01-25T13:16:31.842120504Z level=info msg=starting first_tick=2023-01-25T13:16:40Z
Jan 25 13:16:31 fedora.mylab.io grafana-server[2061]: logger=grafanaStorageLogger t=2023-01-25T13:16:31.851547612Z level=info msg="storage starting"
Jan 25 13:16:31 fedora.mylab.io grafana-server[2061]: logger=ngalert.multiorg.alertmanager t=2023-01-25T13:16:31.85691542Z level=info msg="starting MultiOrg Alertmanager"
........................
This will start the grafana-server process as the grafana user, which is created during package installation.
The default HTTP port is 3000. By default Grafana will log to /var/log/grafana.
The default configuration file is /etc/grafana/grafana.in
with sqlite3 database store located at /var/lib/grafana/grafana.db
Open firewall port for Grafana
If you have a running firewalld service, allow port 3000
to access the dashboard from the network.
sudo firewall-cmd --add-port=3000/tcp --permanent
sudo firewall-cmd --reload
You can access the Grafana web interface on the URL:
http://[Server IP|Hostname]:3000
The default logins are:
username: admin
Password: admin
Don’t forget to change the admin password after the first login.
Start creating Monitoring Dashboards. We have a series of Monitoring Tutorials with Grafana, InfluxDB, and Prometheus. Examples are:
- Monitoring Ceph Cluster with Prometheus and Grafana
- Monitor Linux Server Performance with Prometheus and Grafana in 5 minutes
- How to Monitor BIND DNS server with Prometheus and Grafana
- Monitoring MySQL / MariaDB with Prometheus in five minutes
- How to Monitor Redis Server with Prometheus and Grafana in 5 minutes