Skip to content

Instantly share code, notes, and snippets.

@senthilsweb
Last active February 23, 2021 23:09
Show Gist options
  • Save senthilsweb/4fdf540ef31f2af31456d09d1c1c1be7 to your computer and use it in GitHub Desktop.
Save senthilsweb/4fdf540ef31f2af31456d09d1c1c1be7 to your computer and use it in GitHub Desktop.
Grafana Installation

Grafana Installation

Reference link

https://grafana.com/docs/grafana/latest/installation/rpm/

Pre-requisites

  • sudo or root access required

Step : 1

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

Step : 2

[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

Step : 3

yum install grafana

Step : 4

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

Step : 5 Configure the Grafana server to start at boot

sudo systemctl enable grafana-server

Step 6: Open port 3000 for inbound

firewall-cmd --zone=public --add-port=3000/tcp -permanent
firewall-cmd --reload

or

iptables -I INPUT -p tcp --dport 3000 -j ACCEPT 
service iptables save 
iptables -nL

Step 7: (Optional) Grafana in docker container

Install plugin and restart grafana or restart docker

docker exec -it <containername> grafana-cli --pluginUrl https://github.com/yesoreyeram/grafana-infinity-datasource/releases/download/v0.6.0-alpha2/yesoreyeram-infinity-datasource-0.6.0.zip plugins install yesoreyeram-infinity-datasource

docker exec -it <containername> restart grafana

docker restart <containername>

docker exec -it <containername> grafana-cli --help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment