Ceph篇之利用Prometheus监控ceph服务

news/2024/5/19 0:57:26 标签: ceph, prometheus

一、Ceph内置模块
Ceph manager 内部的模块中包含了 prometheus 的监控模块,并监听在每个 manager 节点的 9283 端口,该端口用于将采集到的信息通过 http 接口向 prometheus 提供数据。
二、监控搭建
1、启用 prometheus 监控模块

ceph mgr module enable prometheus

2、验证模块开启

ceph mgr module ls |less

{
    "always_on_modules": [
        "balancer",
        "crash",
        "devicehealth",
        "orchestrator",
        "pg_autoscaler",
        "progress",
        "rbd_support",
        "status",
        "telemetry",
        "volumes"
    ],
    "enabled_modules": [
        "dashboard",
        "iostat",
        "nfs",
        "prometheus",
        "restful"
    ],
    "disabled_modules": [
        {
            "name": "alerts",
            "can_run": true,
            "error_string": "",
            "module_options": {
                "interval": {
                    "name": "interval",
                    "type": "secs",

3、验证 mgr 节点端口监听

root@ceph-mgr1:~# ss -lntup | grep 9283
tcp   LISTEN  0       5                          *:9283                 *:*      users:(("ceph-mgr",pid=1247,fd=36))  

4、查询prometheus指标节点信息

ceph mgr services

在这里插入图片描述
查询出prometheus对应的metrics地址信息
5、浏览器访问mgr指标
输入 http://IP:9283
在这里插入图片描述
在这里插入图片描述
6、集成Prometheus
添加 mgr 节点 metrics 采集任务

vim prometheus.yml 
- job_name: "ceph-mgr"
    static_configs:
      - targets: ["172.168.100.38:9283"]

重启prometheus

systemctl restart prometheus

prometheus server验证
在这里插入图片描述
集成grafana数据大盘
 在 grafana 添加 采集 ceph集群的 prometheus 数据源
在这里插入图片描述
导入Ceph模板
https://grafana.com/grafana/dashboards/9966-ceph-multicluster/
在这里插入图片描述
OK


http://www.niftyadmin.cn/n/5346417.html

相关文章

大模型笔记【3】 gem5 运行模型框架LLama

一 LLama.cpp LLama.cpp 支持x86,arm,gpu的编译。 1. github 下载llama.cpp https://github.com/ggerganov/llama.cpp.git 2. gem5支持arm架构比较好,所以我们使用编译LLama.cpp。 以下是我对Makefile的修改 开始编译: make UNAME…

Java岛上的勇者林浩然与奇妙注释符

在一个名为Java王国的奇幻岛屿上,居住着一群热爱编程的探索者。有一天,机智勇敢的程序员林浩然决定踏上探寻Java语法奥秘的冒险之旅。 首先,林浩然踏入了代码森林,这片森林中的每一棵树都是一个精心编写的Java程序源码。他发现每…

Linux中文件属性的获取(stat、chmod、Istat、fstat函数的使用)

修改文件权限 函数如下&#xff1a; chmod/fchmod函数用来修改文件的访问权限: #include <sys/stat.h> int chmod(const char *path, mode_t mode); int fchmod(int fd, mode_t mode); 成功时返回0&#xff1b;出错时返回EOF 注意&#xff1a;在vmware和windows共享的文…

【github】github打开慢或者打不开解决方案

目录 1、打开hosts文件&#xff08;C:\Windows\System32\drivers\etc&#xff09; 2、然末尾放入一下两个 IP 地址&#xff1a; 3、替换覆盖原文件 最近github老是打不开&#xff0c;找了一个方法试了一下管用 github网址查询&#xff1a;https://ipaddress.com/website/git…

K8s-持久化(持久卷,卷申明,StorageClass,StatefulSet持久化)

POD 卷挂载 apiVersion: v1 kind: Pod metadata:name: random-number spec:containers:- image: alpinename: alpinecommand: ["/bin/sh","-c"]args: ["shuf -i 0-100 -n 1 >> /opt/number.out;"]volumeMounts:- mountPath: /optname: da…

考研机试 阶乘的和

考研机试 阶乘的和 给定一个非负整数 n&#xff0c;请你判断是否存在一些整数 xi&#xff0c;能够使得 n∑1≤i≤txi!&#xff0c;其中 t≥1,xi≥0,xixj iff ij。iff表示当且仅当。 输入格式 输入包含多组测试数据。 每组数据占一行&#xff0c;包含一个非负整数 n。 最后一行…

制冷系统中的制冷剂加注量对制冷系统的影响

当系统中制冷剂过多时&#xff0c;明显的压缩机负载加大&#xff0c;工作电流增大&#xff0c;冷凝温度升高&#xff0c;冷凝压力也会升高。过多的制冷剂进入蒸发器&#xff0c;液态冷媒在蒸发器内不能充分蒸发&#xff0c;甚至液态冷媒回到压缩机内会造成液击&#xff0c;严重…

客户端请求+返回 服务端之间的请求和返回 实现rpc通信

背景&#xff1a; 1.无论什么类型的游戏&#xff0c;我们都会有rpc通信的需求。 2.由于客户端直连的是游戏服&#xff0c;如果工会&#xff0c;匹配之类的服务是单独的服务的话&#xff0c;必然要进行游戏服到业务服之间的转发&#xff0c;我们是否需要再转发时单独定义Req和Re…