搜索

15.23. 监控复制拓扑

download PDF
使用 dsconf 复制监控 命令显示复制状态,以及供应商、消费者和 hub 上的副本 ID 和更改状态号(CSN):
# dsconf -D "cn=Directory Manager" ldap://supplier.example.com replication monitor
Enter password for cn=Directory Manager on ldap://supplier.example.com: password

Enter a bind DN for consumer.example.com:389: cn=Directory Manager
Enter a password for cn=Directory Manager on consumer.example.com:389: password
Supplier: server.example.com:389
--------------------------------
Replica Root: dc=example,dc=com
Replica ID: 1
Replica Status: Available
Max CSN: 5e3acb77001d00010000

Status For Agreement: "example-agreement" (consumer.example.com:389)
Replica Enabled: on
Update In Progress: FALSE
Last Update Start: 20200205140439Z
Last Update End: 20200205140440Z
Number Of Changes Sent: 1:166/0
Number Of Changes Skipped: None
Last Update Status: Error (0) Replica acquired successfully: Incremental update succeeded
Last Init Start: 20200205133709Z
Last Init End: 20200205133711Z
Last Init Status: Error (0) Total update succeeded
Reap Active: 0
Replication Status: In Synchronization
Replication Lag Time: 00:00:00

Supplier: consumer.example.com:389
-----------------------------------
Replica Root: dc=example,dc=com
Replica ID: 65535
Replica Status: Available
Max CSN: 00000000000000000000

15.23.1. 在 .dsrc 文件中为 Replication Monitoring 设置凭证

默认情况下,dsconf 复制监控 命令会在向远程实例进行身份验证时提示输入绑定 DN 和密码。或者,您可以为用户 ~/.dsrc 文件中的拓扑中的每个服务器设置绑定 DN 和可选密码。

例 15.1. 带有不同字段解释的 .dsrc 文件示例

以下是 ~/.dsrc 文件示例:
[repl-monitor-connections]
connection1 = server1.example.com:389:cn=Directory Manager:*
connection2 = server2.example.com:389:cn=Directory Manager:[~/pwd.txt]
connection3 = hub1.example.com:389:cn=Directory Manager:S3cret
本例使用 connection1 连接 connection3 作为每个条目的密钥。但是,只要它是唯一的,就可以使用任何密钥。
如果您运行 dsconf replication monitor 命令,dsconf 实用程序会连接到实例复制协议中配置的所有服务器。如果实用程序在 ~/.dsrc 中找到主机名,它将使用定义的凭证向远程服务器进行身份验证。在上例中,dsconf 在连接到服务器时使用以下凭证:
主机名 绑定 DN 密码
server1.example.com cn=Directory Manager 密码
server2.example.com cn=Directory Manager ~/pwd.txt读取密码
hub1.example.com cn=Directory Manager S3cret

15.23.2. 在 Replication Topology 监控输出中使用 Aliases

默认情况下,dsconf 复制监控器 命令显示监控报告中服务器的主机名。另外,您可以使用以下方法之一显示别名:
  • ~/.dsrc 文件中定义别名:
    [repl-monitor-aliases]
    M1 = server1.example.com:389
    M2 = server2.example.com:389
  • 通过将 -a alias=host_name:port 参数传给 dsconf 复制监控器命令来定义 别名:
    # dsconf -D "cn=Directory Manager" ldap://server.example.com replication monitor -a M1=server1.example.com:389 M2=server2.example.com:389
在这两种情况下,命令都会在命令的输出中显示别名:
...
Supplier: M1 (server1.example.com:389)
...
Supplier: M2 (server2.example.com:389)
...
Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

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

让开源更具包容性

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

關於紅帽

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

© 2024 Red Hat, Inc.