(Last Updated On: February 1, 2019)

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

For Ubuntu 18,04 server, check:

How to Install Grafana 6 on Ubuntu 18.04

What is new in Grafana 6.0?

  • Explore – A new query focused workflow for ad-hoc data exploration and troubleshooting.
  • Grafana Loki – Integration with the new open source log aggregation system from Grafana Labs.
  • Gauge Panel – A new standalone panel for gauges.
  • New Panel Editor UX improves panel editing and enables easy switching between different visualizations.
  • Google Stackdriver Datasource is out of beta and is officially released.
  • Azure Monitor plugin is ported from being an external plugin to being a core datasource
  • React Plugin support enables an easier way to build plugins.
  • Named Colors in our new improved color picker.

Read more on Grafana 6 release page.

Step 1: Install Grafana 6 on CentOS 7

Grafana 6.0 is still in beta. This article will be updated when Grafana is available in GA. For this installation, we will manually download Grafana RPM package and install it with yum localinstall command.

Download Grafana 6 RPM package.

sudo yum -y install wget
wget https://dl.grafana.com/oss/release/grafana-6.0.0-beta1.x86_64.rpm
sudo yum -y localinstall grafana-6.0.0-beta1.x86_64.rpm

Step 2: Start Grafana 6 service on CentOS 7

After the installation of Grafana 6 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.

$ systemctl status  grafana-server
● grafana-server.service - Grafana instance
Loaded: loaded (/usr/lib/systemd/system/grafana-server.service; enabled; vendor preset: disabled)
Active: active (running) since Fri 2019-02-01 08:09:21 UTC; 3min 37s ago
Docs: http://docs.grafana.org
Main PID: 5506 (grafana-server)
CGroup: /system.slice/grafana-server.service
└─5506 /usr/sbin/grafana-server --config=/etc/grafana/grafana.ini --pidfile=/var/run/grafana/grafana-server.pid --packaging=rpm cfg:defau…
Feb 01 08:09:21 cent-01 grafana-server[5506]: t=2019-02-01T08:09:21+0000 lvl=info msg="Starting plugin search" logger=plugins
Feb 01 08:09:21 cent-01 grafana-server[5506]: t=2019-02-01T08:09:21+0000 lvl=info msg="Plugin dir created" logger=plugins dir=/var/lib/grafana/plugins
Feb 01 08:09:21 cent-01 grafana-server[5506]: t=2019-02-01T08:09:21+0000 lvl=info msg="Initializing CleanUpService" logger=server
Feb 01 08:09:21 cent-01 grafana-server[5506]: t=2019-02-01T08:09:21+0000 lvl=info msg="Initializing NotificationService" logger=server
Feb 01 08:09:21 cent-01 grafana-server[5506]: t=2019-02-01T08:09:21+0000 lvl=info msg="Initializing ProvisioningService" logger=server
Feb 01 08:09:21 cent-01 grafana-server[5506]: t=2019-02-01T08:09:21+0000 lvl=eror msg="Can't read alert notification provisioning files from…otifiers
Feb 01 08:09:21 cent-01 grafana-server[5506]: t=2019-02-01T08:09:21+0000 lvl=info msg="Initializing TracingService" logger=server
Feb 01 08:09:21 cent-01 grafana-server[5506]: t=2019-02-01T08:09:21+0000 lvl=info msg="Initializing Stream Manager"
Feb 01 08:09:21 cent-01 grafana-server[5506]: t=2019-02-01T08:09:21+0000 lvl=info msg="HTTP Server Listen" logger=http.server address=0.0.0…. socket=
Feb 01 08:09:21 cent-01 systemd[1]: Started Grafana instance.

Step 3: Configure Firewall

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 Dashboard

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

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.

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