Limited Time Offer!

For Less Than the Cost of a Starbucks Coffee, Access All DevOpsSchool Videos on YouTube Unlimitedly.
Master DevOps, SRE, DevSecOps Skills!

Enroll Now

Install and Configure Grafana in Ubuntu and Debian

This Tutorial is Deprecated and New Version of Tutorial you can find here – CLICK HERE

Install and Configure Grafana in Ubuntu and Debian

Step 1 – Download & Install Grafana
Download Grafana RPM file RPM for Linux from https://grafana.com/grafana/download?platform=linux

# Ubuntu & Debian
$ wget https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana_5.2.2_amd64.deb
$ sudo dpkg -i grafana_5.2.2_amd64.deb

Step 2 – Understand Grafana Installation details in Ubuntu/Debian

  1. Installs binary to /usr/sbin/grafana-server
  2. Installs Init.d script to /etc/init.d/grafana-server
  3. Creates default file (environment vars) to /etc/default/grafana-server
  4. Installs configuration file to /etc/grafana/grafana.ini
  5. Installs systemd service (if systemd is available) name grafana-server.service
  6. The default configuration sets the log file at /var/log/grafana/grafana.log
  7. The default configuration specifies an sqlite3 db at /var/lib/grafana/grafana.db
  8. Installs HTML/JS/CSS and other Grafana files at /usr/share/grafana

Step 3 – Start the server (init.d service)

[code]$ sudo service grafana-server start[/code]

This will start the grafana-server process as the grafana user, which was created during the package installation. The default HTTP port is 3000 and default user and group is admin.

Step 4 – Configure the Grafana server to start at boot time

[code]$ sudo update-rc.d grafana-server defaults
$ systemctl daemon-reload
$ systemctl start grafana-server
$ systemctl status grafana-server
$ sudo systemctl enable grafana-server.service[/code]

Step 5 – Grafana server Environment file
The systemd service file and init.d script both use the file located at /etc/default/grafana-server for environment variables used when starting the back-end. Here you can override log directory, data directory and other variables.

Step 6 – Grafana server Log
By default Grafana will log to /var/log/grafana

Step 7 – Grafana Database
The default configuration specifies a sqlite3 database located at /var/lib/grafana/grafana.db.

You can also use MySQL or Postgres as the Grafana database, as detailed on
http://docs.grafana.org/installation/configuration/#database

Step 7 – Grafana configuration
The configuration file is located at /etc/grafana/grafana.ini. Go the Configuration page for details on all those options. You can add following data sources

  1. Graphite
  2. InfluxDB
  3. OpenTSDB
  4. Prometheus

Step 8 – Server side image rendering
Server side image (png) rendering is a feature that is optional but very useful when sharing visualizations, for example in alert notifications.

[code]$ yum install fontconfig
$ yum install freetype*
$ yum install urw-fonts[/code]

Step 9 – How to access the Grafana dashboard

http://13.232.27.156:3000/
User name – admin
Password – admin

Rajesh Kumar
Follow me
Subscribe
Notify of
guest
0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x