IPnode |
系統linux |
組件web |
10.172.112.1(server)json 10.52.210.223vim |
CentOS Linux release 7.2.1511 (Core)url |
Prometheusnode_exporterspa grafana插件 |
10.52.210.2243d |
CentOS Linux release 7.2.1511 (Core)rest |
node_exporter |
tar -xvf prometheus-2.12.0.linux-amd64.tar.gz
cd prometheus-2.12.0.linux-amd64/
./prometheus –version(查看版本)
vim prometheus.yml添加監控項
nohup ./prometheus --config.file=prometheus.yml &啓動prometheus
Tar -xvf node_exporter-0.18.1.linux-amd64.tar.gz
Cd node_exporter-0.18.1.linux-amd64/
nohup ./node_exporter &啓動node_exporter
點擊Statusc菜單下,configuration Rule Targets 等
Configuration展現prometheus.Yml配置文件
tar -xvf grafana-2.5.0.linux-x64.tar.gz
cd grafana-2.5.0/
./bin/grafanf-server web
nohup ./bin/grafana-server web&
http://10.52.210.223/3000
admin/admin
Add data source----->http://10.52.210.223:9090-->dashboards-->prometheus2.0-->sace&test
http://10.52.210.223:9090
下載方法:https://grafana.com/dashboards/405-->Dashboards-->點擊搜索欄node-exporter-server-metrics -->點擊第一個進去--> version-->download
在grafana的Dashboard中導入模板的json文件
此監控模板基於node_exporter 能夠更好的展現多項基本監控項
模板的url https://grafana.com/dashboards/8919
在grafana所在的server安裝餅狀圖插件,並重啓grafana
餅狀圖地址:
http://grafana.com/grafana/plugins/grafana-piechart-panel
Cd /usr/local/grafana/bin
./grafana-cli plugins install grafana-piechart-panel
Killall grafana-server
Nohup./grafana-server restart &
圖像界面配置
處理方法:
4-1-1 安裝插件grafana-piechart-panel 將包下載到本地若沒法安裝成功
4-1-2 更改配置文件:defaults.ini
添加:
[plugin.piechart]
path = /var/lib/grafana/plugins/grafana-piechart-panel/(grafana-piechart-panel存放目錄)
1-3 重啓grafana程序