slzdevsnp
2/19/2020 - 8:30 AM

[grafana] #bi #unix #dashboard

[grafana] #bi #unix #dashboard

installing grafana with an rpm package

applicable to redhat, centos, aws linux

via downloaded rpm package

on aws host:

sudo yum update

from https://grafana.com/grafana/download

wget https://dl.grafana.com/oss/release/grafana-6.6.1-1.x86_64.rpm
sudo yum localinstall grafana-6.6.1-1.x86_64.rpm

via downloaded deb package

on ubuntu

https://grafana.com/grafana/download

check the latest linux version and copy the version

wget https://dl.grafana.com/oss/release/grafana_6.2.5_amd64.deb
sudo dpkg -i grafana_6.2.5_amd64.deb
sudo apt-get -f install  #fixes the missed dependencies

enable grafana-server in daemon

sudo systemctl daemon-reload
sudo systemctl start grafana-server
sudo systemctl status grafana-server

# configure grafana server to start at boot
sudo systemctl enable grafana-server.service

configurure grafana

Main config file : /etc/grafana/grafana.ini

sudo vi /etc/grafana/grafana.ini

change port: http_port = 8883

uncomment: protocol = http

leave [database] to default (sqlite3)

set instance name manually instance_name = dip2-grafana-poc

restart grafana after config change

sudo systemctl stop grafana-server
sudo systemctl start grafana-server
sudo systemctl status grafana-server

connect and configure the datasource

in browser: open http://grafana_host_ip:port

on a first connection use admin user and set the admin password.

Store the admin user password securely

Configure a postgres (timescaledb) datasource

expected package details

  • Installs binary to /usr/sbin/grafana-server
  • Copies init.d script to /etc/init.d/grafana-server
  • Installs default file (environment vars) to /etc/sysconfig/grafana-server
  • Copies configuration file to /etc/grafana/grafana.ini
  • Installs systemd service (if systemd is available) name grafana-server.service
  • The default configuration uses a log file at /var/log/grafana/grafana.log
  • The default configuration specifies an sqlite3 database at /var/lib/grafana/grafana.db