(Last Updated On: November 21, 2018)

Grafana is the leading open source feature-rich metrics dashboard and graph editor for Graphite, Elasticsearch, OpenTSDB, Prometheus, and InfluxDB. This tutorial will guide you through the installation of Grafana on Fedora 29 / Fedora 28.

For CentOS / Ubuntu, use:

How to Install Grafana on Ubuntu 18.04 and Debian 9

Install Grafana and InfluxDB on CentOS 7

Install Grafana on Fedora 29 / Fedora 28

Grafana is available from the upstream YUM repository though you can also install it from an RPM package.

Add Grafana yum repository:

sudo vi /etc/yum.repos.d/grafana.repo

Add the following data to the file:

[grafana]
name=grafana
baseurl=https://packagecloud.io/grafana/stable/el/7/$basearch
repo_gpgcheck=1
enabled=1
gpgcheck=1
gpgkey=https://packagecloud.io/gpg.key https://grafanarel.s3.amazonaws.com/RPM-GPG-KEY-grafa

Step 2: Install Grafana on Fedora 29 / Fedora 28

The install Grafana on Fedora 29 / Fedora 28 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:

$ sudo systemctl status grafana-server
● grafana-server.service - Grafana instance
   Loaded: loaded (/usr/lib/systemd/system/grafana-server.service; disabled; vendor preset: disabled)
   Active: active (running) since Wed 2018-11-21 20:38:08 UTC; 30s ago
     Docs: http://docs.grafana.org
 Main PID: 12041 (grafana-server)
    Tasks: 8 (limit: 1149)
   Memory: 12.5M
   CGroup: /system.slice/grafana-server.service
           └─12041 /usr/sbin/grafana-server --config=/etc/grafana/grafana.ini --pidfile=/var/run/grafana/grafana-server.pid>

Nov 21 20:38:08 fed29 grafana-server[12041]: t=2018-11-21T20:38:08+0000 lvl=info msg="Initializing InternalMetricsService" >
Nov 21 20:38:08 fed29 grafana-server[12041]: t=2018-11-21T20:38:08+0000 lvl=info msg="Initializing AlertingService" logger=>
Nov 21 20:38:08 fed29 grafana-server[12041]: t=2018-11-21T20:38:08+0000 lvl=info msg="Initializing CleanUpService" logger=s>
Nov 21 20:38:08 fed29 grafana-server[12041]: t=2018-11-21T20:38:08+0000 lvl=info msg="Initializing NotificationService" log>
Nov 21 20:38:08 fed29 grafana-server[12041]: t=2018-11-21T20:38:08+0000 lvl=info msg="Initializing ProvisioningService" log>
Nov 21 20:38:08 fed29 grafana-server[12041]: t=2018-11-21T20:38:08+0000 lvl=info msg="Initializing RenderingService" logger>
Nov 21 20:38:08 fed29 grafana-server[12041]: t=2018-11-21T20:38:08+0000 lvl=info msg="Initializing TracingService" logger=s>
Nov 21 20:38:08 fed29 systemd[1]: Started Grafana instance.
Nov 21 20:38:08 fed29 grafana-server[12041]: t=2018-11-21T20:38:08+0000 lvl=info msg="Initializing Stream Manager"
Nov 21 20:38:08 fed29 grafana-server[12041]: t=2018-11-21T20:38:08+0000 lvl=info msg="HTTP Server Listen" logger=ht

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

How to 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