命令记不住

登陆

Promtheus Grafana 监控 ceph

06.Promtheus Grafana监控ceph

1.docker部署监控

1.安装docker环境

2.启动Promtheus Grafana

docker run -d --name=grafana -p 3000:3000 grafana/grafana
docker run -d --name=promtheus -p 9090:9090 prom/prometheus

2.启用MGR Promtheus插件

ceph mgr module enable prometheus
# 测试接口
curl 127.0.0.1:9283/metrics

.

3.配置ceph监控采集

prometheus配置文件添加以下内容

docker exec -it 61fe69555e8c sh
$ vi /etc/prometheus/prometheus.yml
  - job_name: "ceph"
    static_configs:
      - targets: ["192.168.6.141:9283"]
      
docker restart 61fe69555e8c

4.访问grafana仪表盘

默认账户密码

admin/admin

1.添加prometheus为数据源

2.导入ceph监控仪表盘: import -> 输入id

  • Ceph-Cluster : 2842
  • Ceph-OSD : 5336
  • Ceph-Pool : 5342
推荐阅读