物聯網架構成長之路(52)-基於Nacos+prometheus+grafana的監控

0. 前言
  最近已經開始研發物聯網V2版本了。決定使用BladeX做爲基礎的Web管理界面。而後結合EMQ、Kafka等第三方開源中間件實現平臺。接下來幾個章節都是講物聯網V2版本的一些基礎設施。html


1. 安裝Nacos+Promethes+grafana
  官方Nacos文檔裏面提供的docker-compose.yamlgit

1 git clone https://github.com/nacos-group/nacos-docker.git
2 cd nacos-docker/example/
3 cp standalone-derby.yaml docker-compose.yaml
4 docker-compose up -d

  注意修改PREFER_HOST_MODE 爲外網IP
github


2. 各個中間件界面
  Nacos
  默認密碼 nacos/nacos

  Prometheus
  無登陸賬號密碼
docker


  Grafana
  默認密碼 admin/admin
json

 

3. 配置監控數據源
  因爲我是使用docker-compose做爲開發測試環境,因此這裏的URL直接配置成 http://prometheus:9000 便可。還有一個要注意這裏建立的數據源最好命名爲prometheus,由於後面的Grafana面板導入JSON的時候,默認就是指向這個DataSources.
ide


4. 配置監控面板
  從這裏下載Grafana監控面板。測試

1 https://github.com/nacos-group/nacos-template/blob/master/nacos-grafana.json
2 https://github.com/nacos-group/nacos-template/blob/master/nacos-sync-grafana

 

 

參考資料:
  https://nacos.io/zh-cn/docs/monitor-guide.htmlui

本文地址:http://www.javashuo.com/article/p-gcvrmrrq-nb.html
本系列目錄: http://www.javashuo.com/article/p-csrtccut-nc.html
我的主頁:https://www.wunaozai.com/spa

相關文章
相關標籤/搜索