搜索

5.3. 使用 Ceph Manager 模块

download PDF

使用 ceph mgr module ls 命令查看可用的模块以及当前启用的模块。

使用 ceph mgr module 启用或禁用模块启用 MODULE 命令,或者 ceph mgr module 会分别禁用 MODULE 命令。

如果启用了模块,则活跃的 ceph-mgr 守护进程将加载并执行它。对于提供服务的模块(如 HTTP 服务器),则模块可能会在加载时发布其地址。要查看此类模块的地址,请运行 ceph mgr services 命令。

有些模块还可能实施特殊的待机模式,该模式在备用 ceph-mgr 守护进程和活动守护进程上运行。这可让服务提供的模块,在客户端尝试连接到待机时将其客户端重定向到活跃守护进程。

以下是启用 dashboard 模块的示例:

[ceph: root@host01 /]# ceph mgr module enable dashboard

[ceph: root@host01 /]# ceph mgr module ls
MODULE
balancer              on (always on)
crash                 on (always on)
devicehealth          on (always on)
orchestrator          on (always on)
pg_autoscaler         on (always on)
progress              on (always on)
rbd_support           on (always on)
status                on (always on)
telemetry             on (always on)
volumes               on (always on)
cephadm               on
dashboard             on
iostat                on
nfs                   on
prometheus            on
restful               on
alerts                -
diskprediction_local  -
influx                -
insights              -
k8sevents             -
localpool             -
mds_autoscaler        -
mirroring             -
osd_perf_query        -
osd_support           -
rgw                   -
rook                  -
selftest              -
snap_schedule         -
stats                 -
telegraf              -
test_orchestrator     -
zabbix                -

[ceph: root@host01 /]# ceph mgr services
{
        "dashboard": "http://myserver.com:7789/",
        "restful": "https://myserver.com:8789/"
}

集群首次启动时,它使用 mgr_initial_modules 设置覆盖要启用哪些模块。但是,通过集群的其余部分忽略此设置:只将其用于 bootstrap。例如,在第一次启动 monitor 守护进程前,您可以在 ceph.conf 文件中添加类似如下的部分:

[mon]
    mgr initial modules = dashboard balancer

如果模块实施注释行 hook,命令可作为普通 Ceph 命令访问,Ceph 会自动将模块命令合并到标准 CLI 界面中,并将其正确路由到模块:

[ceph: root@host01 /]# ceph <command | help>

您可以在上述命令中使用以下配置参数:

表 5.1. 配置参数
配置描述类型default

mgr 模块路径

从中加载模块的路径。

字符串

"<library dir>/mgr"

mgr 数据

加载守护进程数据的路径(如密钥环)

字符串

"/var/lib/ceph/mgr/$cluster-$id"

mgr tick period

Manager beacons to monitor 和其它定期检查之间的秒数。

整数

5

mon mgr beacon grace

最后一个 beacon 后的时长应被视为管理器失败。

整数

30

Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

© 2024 Red Hat, Inc.