Grafana をインストールする
習慣化167日目
Grafanaをインストールする。
環境 VMWare上で動いているCentOS6
参考にさせてもらったサイト
監視ツール prometheusをインストールする | ex1-lab
https://ex1.m-yabe.com/archives/4810
Grafana を使ってみる | SIOS Tech. Lab
https://tech-lab.sios.jp/archives/16365
インストールから画面で確認するまで
ファイルを準備してインストールする
# cd /usr/local/src/ # wget https://dl.grafana.com/oss/release/grafana-7.3.2-1.x86_64.rpm # yum install grafana-7.3.2-1.x86_64.rpm
iptableで許可する
デフォルトはポート3000でアクセスするそうなので開けておく。
# cd /etc/sysconfig/ # cp -ip iptables BACKUP/iptables.2020111201 # vi iptables # diff -u BACKUP/iptables.2020111201 iptables +-A INPUT -m state --state NEW -m tcp -p tcp --dport 3000 -j ACCEPT 設定反映前の確認 # service iptables status 設定を反映 # service iptables restart 設定反映後の確認 # service iptables status
サービスに登録する
[root@centos6 sysconfig]# chkconfig --list |grep gra [root@centos6 sysconfig]# chkconfig --add grafana-server [root@centos6 sysconfig]# chkconfig --list |grep gra grafana-server 0:off 1:off 2:on 3:on 4:on 5:on 6:off
サービスを起動する
# service grafana-server start Starting Grafana Server: ... [ OK ]
Grafanaにアクセスする
→表示できた!