15.23. レプリケーショントポロジーの監視

dsconf replication monitor コマンドを使用して、レプリケーションステータスと、サプライヤー、コンシューマー、およびハブのレプリカ ID、Change State Numbers (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 ファイルでのレプリケーション監視の認証情報の設定

デフォルトでは、dsconf replication monitor コマンドは、リモートインスタンスに対して認証する際に、バインド 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 Password
server1.example.com cn=Directory Manager パスワードの入力を要求します。
server2.example.com cn=Directory Manager ~/pwd.txt からパスワードを読み取る
hub1.example.com cn=Directory Manager S3cret

15.23.2. レプリケーショントポロジーモニタリング出力でのエイリアスの使用

デフォルトでは、dsconf replication monitor コマンドは監視レポートにサーバーのホスト名を表示します。または、以下のいずれかの方法でエイリアスを表示できます。
  • ~/.dsrc ファイルでエイリアスを定義します。
    [repl-monitor-aliases]
    M1 = server1.example.com:389
    M2 = server2.example.com:389
  • -a alias=host_name:port パラメーターを dsconf replication monitor コマンドに渡してエイリアスを定義します。
    # 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)
...