In this blog post, we’ll cover the steps to Install Grafana 8 on CentOS 7. Grafana v8 was recently released in with plenty of new features and is available for installation. Grafana is an open source tool which allows you to query, visualize and do alerting on your metrics no matter the backend data store.

install grafana 6 centos7

For Ubuntu server, check:

How to Install Grafana on Ubuntu

What is new in Grafana 8.0?

  • Library panels: Allow users to build panels that can be used in multiple dashboards
  • Prometheus metrics browser: Allows you to quickly find metrics and select relevant labels to build basic queries.
  • Grafana v8.0 alerts: Centralizes alerting information for Grafana managed alerts and alerts from Prometheus-compatible data sources in one UI and API.
  • Real-time streaming: Data sources can now send real-time updates to dashboards over a websocket connection
  • Bar chart visualization: A new visualization that supports categorical data
  • Histogram visualization: This hidden feature of the old Graph panel is now a standalone visualization
  • State timeline visualization: The State timeline visualization shows discrete state changes over time
  • Time series visualization out of Beta and is now graduating to a stable state
  • Download logs: When you inspect a panel, you can now download log results as a text (.txt) file.

Read more on Grafana 8 release page.

Step 1: Install Grafana 8 on CentOS 7

Grafana 6 is now available for installation. Add Grafana RPM repository to your system.

sudo tee  /etc/yum.repos.d/grafana.repo<<EOF
[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

If you’re interested in Beta releases of Grafana, then add beta repository.

[grafana]
name=grafana
baseurl=https://packages.grafana.com/oss/rpm-beta
repo_gpgcheck=1
enabled=1
gpgcheck=1
gpgkey=https://packages.grafana.com/gpg.key
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt

Once the repository is added, install grafana rpm package.

 sudo yum  -y install grafana

See more details about installed package.

$ rpm -qi grafana
Name        : grafana
Version     : 8.0.4
Release     : 1
Architecture: x86_64
Install Date: Fri 02 Jul 2021 02:05:25 AM EAT
Group       : default
Size        : 181997268
License     : "Apache 2.0"
Signature   : RSA/SHA256, Thu 01 Jul 2021 03:47:43 PM EAT, Key ID 8c8c34c524098cb6
Source RPM  : grafana-8.0.4-1.src.rpm
Build Date  : Thu 01 Jul 2021 03:47:14 PM EAT
Build Host  : 623ddf8d9e19
Relocations : /
Packager    : [email protected]
Vendor      : Grafana
URL         : https://grafana.com
Summary     : Grafana

Step 2: Start Grafana 8 service on CentOS 7

After the installation of Grafana 8 on CentOS 7, the service can be started and enabled to start on system start using systemctl service management command:

sudo systemctl enable --now grafana-server

The service should be in running state.

$ 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 Fri 2021-07-02 02:06:18 EAT; 5s ago
     Docs: http://docs.grafana.org
 Main PID: 57110 (grafana-server)
    Tasks: 17 (limit: 1647954)
   Memory: 32.6M
   CGroup: /system.slice/grafana-server.service
           └─57110 /usr/sbin/grafana-server --config=/etc/grafana/grafana.ini --pidfile=/var/run/grafana/grafana-server.pid --packaging=rpm cfg:default.paths.log>

Jul 02 02:06:18 osp3 grafana-server[57110]: t=2021-07-02T02:06:18+0300 lvl=info msg="migrations completed" logger=migrator performed=330 skipped=0 duration=377.1>
Jul 02 02:06:18 osp3 grafana-server[57110]: t=2021-07-02T02:06:18+0300 lvl=info msg="Created default admin" logger=sqlstore user=admin
Jul 02 02:06:18 osp3 grafana-server[57110]: t=2021-07-02T02:06:18+0300 lvl=info msg="Created default organization" logger=sqlstore
Jul 02 02:06:18 osp3 grafana-server[57110]: t=2021-07-02T02:06:18+0300 lvl=info msg="Starting plugin search" logger=plugins
Jul 02 02:06:18 osp3 grafana-server[57110]: t=2021-07-02T02:06:18+0300 lvl=info msg="Registering plugin" logger=plugins id=input
Jul 02 02:06:18 osp3 grafana-server[57110]: t=2021-07-02T02:06:18+0300 lvl=info msg="Registering plugin" logger=plugins id=grafana-plugin-admin-app
Jul 02 02:06:18 osp3 grafana-server[57110]: t=2021-07-02T02:06:18+0300 lvl=info msg="External plugins directory created" logger=plugins directory=/var/lib/grafan>
Jul 02 02:06:18 osp3 grafana-server[57110]: t=2021-07-02T02:06:18+0300 lvl=info msg="Live Push Gateway initialization" logger=live.push_http
Jul 02 02:06:18 osp3 systemd[1]: Started Grafana instance.
Jul 02 02:06:18 osp3 grafana-server[57110]: t=2021-07-02T02:06:18+0300 lvl=info msg="HTTP Server Listen" logger=http.server address=[::]:3000 protocol=http subUr>

Step 3: Configure Firewall for Grafana

If you have an active firewalld service, ensure port 3000 is allowed.

sudo firewall-cmd --add-port=3000/tcp --permanent
sudo firewall-cmd --reload

Confirm the port is allowed in the firewalld.

$ firewall-cmd --list-all | grep 3000
ports: 3000/tcp

Step 4: Access Grafana 8 Dashboard on CentOS 7

Once the service has been started, you can access its web dashboard by visiting http://[serverip|hostname]:3000.

install grafana 6 ubuntu 18 01

The default login details are:

Username: admin
Password: admin

You’re asked to reset admin password after successful login. Provide a new password and confirm.

install grafana 6 ubuntu 18 02

Grafana Package details:

  • Installs binary to /usr/sbin/grafana-server
  • Installs Init.d script to /etc/init.d/grafana-server
  • Creates a default file (environment vars) to /etc/sysconfig/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

Step 5: Adding Data Sources to Grafana

Grafana supports many different storage backends for your time series data. Each Data Source has a specific Query Editor that is customized for the features and capabilities that the particular Data Source exposes.

The following datasources are officially supported:

Step 6: Monitoring with Grafana

See our few guides on how you can monitor your infrastructure using Grafana and InfluxDB / Prometheus.

Monitor Linux System with Grafana and Telegraf

Monitoring Ceph Cluster with Prometheus and Grafana

How to Monitor BIND DNS server with Prometheus and Grafana

Monitoring MySQL / MariaDB with Prometheus in five minutes

How to Monitor Apache Web Server with Prometheus and Grafana in 5 minutes

How to Monitor Linux Server Performance with Prometheus and Grafana in 5 minutes

How to Monitor Redis Server with Prometheus and Grafana in 5 minutes

How to Monitor Apache Web Server with Prometheus and Grafana in 5 minutes

Your support is our everlasting motivation,
that cup of coffee is what keeps us going!


As we continue to grow, we would wish to reach and impact more people who visit and take advantage of the guides we have on our blog. This is a big task for us and we are so far extremely grateful for the kind people who have shown amazing support for our work over the time we have been online.

Thank You for your support as we work to give you the best of guides and articles. Click below to buy us a coffee.

LEAVE A REPLY

Please enter your comment!
Please enter your name here