grafana部署安裝

2022-08-22 00:24:11 字數 1707 閱讀 1041

在prometheus& grafana server節點部署grafana服務。

[root@prometheus ~]#cd /usr/local/src/

[root@prometheus src]#wget

#安裝[root@prometheus src]#yum localinstall grafana-6.3.2-1.x86_64

.rpm

配置檔案位於/etc/grafana/grafana.ini,這裡暫時保持預設配置即可。

[root@prometheus src]#systemctl enable grafana-server

[root@prometheus src]#systemctl start grafana-server

#grafana-server預設使用3000埠

[root@prometheus src]#vim /etc/sysconfig/iptables

-a input -p tcp -m state --state new -m tcp --dport 3000 -j accept

[root@prometheus src]#service iptables restart

訪問:預設賬號/密碼:admin/admin

在登陸首頁,點選"add data source"按鈕,跳轉到新增資料來源頁面,配置如下:

取消default的勾選,其餘預設,點選"add",如下:

在"dashboards"頁簽下"import"自帶的模版,如下:

grafana首頁-->左上角圖示-->dashboard-->import

資料來源選擇"prometheus",即新增的資料來源name,點選"import"按鈕,如下:

grafana首頁-->左上角圖示-->dashboard-->home,home下拉列表中可見有已新增的兩個dashboard,"prometheus stats"與"node exporter server metrics",選擇1個即可,如下:

容器部署grafana

容器部署grafana 之前部署的prometheus alertmanger執行的使用者都是普通使用者,需要建立宿主機對應的賬號去執行和授權對應服務。docker執行的grafana使用者是普通使用者,掛載的目錄保持跟普通使用者一致。root master docker compose group...

grafana安裝使用

dockerfile 檔案 from grafana grafana 6.5.0 ubuntu copy aliyun log grafana datasource plugin var lib grafana plugins aliyun log grafana datasource plugin...

grafana 安裝 啟動

6.在 gopath src github.com unknwon bra 目錄下執行 go run bra.go run,可以把bra命令配置到環境變數中 7.編譯後端,在 gopath src github.com grafana grafana 分別執行 go run build.go set...