本篇文章為大家展示了如何安裝與使用grafana,內容簡明扼要并且容易理解,絕對能使你眼前一亮,通過這篇文章的詳細介紹希望你能有所收獲。
1.1 官網下載
1.2 下載之后上傳
上傳之后查看
[root@localhost ~]# ls grafana-7.3.3-1.x86_64.rpm
1.3 yum安裝解決依賴關系
yum -y install grafana-7.3.3-1.x86_64.rpm
2.1 開啟服務
systemctl start grafana-server
2.2 查看端口驗證(grafana默認監聽3000端口)
[root@localhost ~]# netstat -nlpt|grep 3000 tcp6 0 0 :::3000 :::* LISTEN 21185/grafana-serve
3.1 打開瀏覽器輸入 IP:3000 訪問
例如: 192.168.153.183:3000
3.2 訪問成功之后輸入默認的用戶名和密碼登錄
默認的用戶名和密碼均為:admin
3.3 登陸成功之后配置新的密碼
3.4 成功訪問grafana主頁
3.5 添加zabbix插件和clock插件
grafana 默認插件的存放位置為:/var/lib/grafana/plugins
1)
2)
3)
4)
5)
6)在服務器安裝
[root@localhost ~]# cd /var/lib/grafana/plugins/ 安裝zabbix創建 [root@localhost plugins]# grafana-cli plugins install alexanderzobnin-zabbix-app installing alexanderzobnin-zabbix-app @ 4.1.1 from: https://grafana.com/api/plugins/alexanderzobnin-zabbix-app/versions/4.1.1/download into: /var/lib/grafana/plugins ? Installed alexanderzobnin-zabbix-app successfully Restart grafana after installing plugins . <service grafana-server restart> [root@localhost plugins]# 安裝clock插件 [root@localhost plugins]# grafana-cli plugins install grafana-clock-panel installing grafana-clock-panel @ 1.1.1 from: https://grafana.com/api/plugins/grafana-clock-panel/versions/1.1.1/download into: /var/lib/grafana/plugins ? Installed grafana-clock-panel successfully Restart grafana after installing plugins . <service grafana-server restart> [root@localhost plugins]# 安裝之后查看 [root@localhost plugins]# ls alexanderzobnin-zabbix-app grafana-clock-panel
6)重啟grafana服務
systemctl restart grafana-server
7)
8)使能 zabbix(clock插件安裝之后直接可以使用,無需設置)
3.6 添加zabbix數據源
1)
2)
3)
4)輸入連接zabbix接口的用戶名和密碼,用戶名為admin,密碼為 zabbix
5)測試成功
6)導入儀表板
3.7 創建新的儀表板
3.8 創建CPU空閑率儀表板
3.9 添加儀表板
3.9 添加可用內存儀表板
3.10 添加時間儀表板
1)
2)
3)
4)
5)
6)
上述內容就是如何安裝與使用grafana,你們學到知識或技能了嗎?如果還想學到更多技能或者豐富自己的知識儲備,歡迎關注億速云行業資訊頻道。
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。