Nacos 监控

Nacos Docker

Clone 项目

git clone https://github.com/nacos-group/nacos-docker.git
cd nacos-docker

单机模式 Derby

standalone-derby.yaml

version: "2"
services:
  nacos:
    image: nacos/nacos-server:latest
    container_name: nacos-standalone
    environment:
    - PREFER_HOST_MODE=hostname
    - MODE=standalone
    volumes:
    - ./standalone-logs/:/home/nacos/logs
    - ./init.d/custom.properties:/home/nacos/init.d/custom.properties
    ports:
    - "8848:8848"
  prometheus:
    container_name: prometheus
    image: prom/prometheus:latest
    volumes:
      - ./prometheus/prometheus-standalone.yaml:/etc/prometheus/prometheus.yml
    ports:
      - "9090:9090"
    depends_on:
      - nacos
    restart: on-failure
  grafana:
    container_name: grafana
    image: grafana/grafana:latest
    ports:
      - 3000:3000
    restart: on-failure

docker-compose -f example/standalone-derby.yaml up

如果希望使用MySQL5.7

docker-compose -f example/standalone-mysql-5.7.yaml up

集群模式

docker-compose -f example/cluster-hostname.yaml up 

验证nacos

link:http://127.0.0.1:8848/nacos/

用户名/密码:nacos/nacos

验证prometheus

通过访问http://{ip}:9090/graph可以看到prometheus的采集数据,在搜索栏搜索nacos_monitor可以搜索到Nacos数据说明采集数据成功

http://127.0.0.1:9090/graph/

搭建grafana图形化展示metrics数据

http://127.0.0.1:3000

用户名/密码:admin/admin

添加数据源

Configuration > Data Sources

Add data source

点击 Save & Test.

添加仪表盘

点击 + 图标,选择 Create Dashboard, 然后点击 Add new panel

在 New Dashboard/Edit Panel 视图, 转到 Query 选项卡.

选择 -- Grafana -- 数据源. 

点击保存

添加一个名称

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值