node_exporter是采集器京办,把采集到的數(shù)據(jù)存儲到prometheus數(shù)據(jù)庫,然后grafana取數(shù)據(jù)庫里面的數(shù)據(jù)帆焕,進行展示;
prometheus部署
下載對應(yīng)的系統(tǒng)版本
解壓后不恭,雙擊prometheus.exe叶雹,如下圖:
點擊允許訪問,如下圖:
瀏覽器輸入http://localhost:9090/换吧,如下圖:
點擊Status-Targets折晦,如下圖:
新打開的http://localhost:9090/targets頁面如下:
node_exporter部署
下載相應(yīng)的msi版本:
下載好后,一直Next沾瓦,直到安裝完成满着,打開瀏覽器谦炒,輸入http://localhost:9182,
打開如下頁面:
CTRL+F5,搜索cpu风喇,有下面的內(nèi)容宁改,說明采集成功
?配置prometheus目錄下的prometheus.yml文件
//加入如下內(nèi)容:
- job_name: 'localhost9182'
static_configs:
- targets: ['localhost:9182']
重啟prometheus后,瀏覽器查看http://localhost:9090/targets頁面魂莫,可以看到剛才加入的job:
grafana的安裝與配置
下載相應(yīng)的msi还蹲,下載好后,進行安裝:
一直Next 耙考,安裝完即可,然后瀏覽器輸入http://localhost:3000/
admin/admin 登錄進去以后谜喊,配置prometheus數(shù)據(jù)源
去官網(wǎng)上找到windows系統(tǒng)相關(guān)的面板,復(fù)雜id后導(dǎo)入面板
結(jié)果展示