框架:Grafana+Prometheus+Mysqld_exporter?
一、監控查看端安裝
Grafana安裝-CSDN博客
普羅米修斯Prometheus監控安裝(mac)-CSDN博客
1.啟動Grafana服務
brew services start grafana
- 打開瀏覽器輸入
http://localhost:3000
進入grafana登錄頁面?
(默認用戶名和密碼都為admin,進入后可以更新密碼,也可以跳過)?
2.啟動?prometheus服務
查看安裝位置
which prometheus
找到默認配置prometheus.yml的位置?
/usr/local/etc/prometheus.yml
啟動Prometheus server
prometheus --config.file=/usr/local/etc/prometheus.yml
啟動后瀏覽器輸入:?http://localhost:9090/targets
http://localhost:9090/targets
查看監控數據?
http://localhost:9090/metrich
二、被監控端安裝
?Linux安裝mysql_exporter-CSDN博客
設置后,可在http://localhost:9090/targets頁面中看到
三、應用
?1.grafana登錄后,添加數據源
2.選擇?prometheus
下面第 2 步是prometheus的服務URL,本文是本機的ip地址
拉到頁面最下面,點擊“save and test”?
3.添加模板?
儀表盤 import, ID:17320 或者 14057?
Mysqld_exporter模板
?選擇自己需要的模板
?上滑到頁面頂端
?
4.效果
安裝Node_exporter后,CPU\內存等才會顯示