15.23. Monitoring Replication Status

The replication status can be viewed in the Directory Server Console, Red Hat Administration Express (Section 15.23.2, “Monitoring Replication from Admin Express”), or from the command line.

15.23.1. Monitoring Replication Status from the Console

  1. Select the Status tab, and then, in the left navigation tree, select Replication Status.
    In the right pane, a table appears that contains information about each of the replication agreements configured for this server.
  2. Click Refresh to update the contents of the tab.
    The status information displayed is described in Table 15.2, “Directory Server Console Replication Status”.

Table 15.2. Directory Server Console Replication Status

Table Header Description
Agreement The name of the replication agreement.
Replica suffix The suffix that is replicated.
Supplier The supplier server in the agreement.
Consumer The consumer server in the agreement.
Number of changes A ratio showing the changes sent to this replica since the server started. This value has the format replica_id:changes_sent/changes_skipped. So, if the replica ID is 7, 100 changes were sent, and no changes were skipped, the value of the number of changes is 7:100/0.
Last replica update began The time when the most recent replication update started.
Last replica update ended The time when the most recent replication update ended.
Last update message The status for the most recent replication updates.
Consumer initialization The current status on consumer initialization (in progress or not).
Last consumer initialization update message The status on the last initialization of the consumer.
Last consumer initialization began The time when the initialization of the consumer replica started.
Last consumer initialization ended The time when the initialization of the consumer replica ended.

15.23.2. Monitoring Replication from Admin Express

Admin Express has an option to monitor replication status in real-time, meaning that it shows the number of updates, times the most recent updates were sent, error and success messages, replication schedule, the replicated directory suffix, and other information. Unlike other ways of checking replication status, the Admin Express Replication Status page shows the real-time status of replication, including updates in progress, current changes sequence numbers, and the lag between when a change is made on the supplier and when that change is sent to the consumer.
Monitoring replication is set up using a simple configuration file which specifies which server to monitor and what supplier and consumer replicas to include in the status page.
When trying to monitor replication status through Admin Express, remember two things:
  • The Replication Status page is only available for supplier servers. (It can be opened for other types of replicas; there is just no information available and has the message The server is not a master or it has no replication agreement.)
  • The configuration file must be in a directory that is accessible to Administration Server, and the file must be readable by the Administration Server user. By default, the user is dirsrv.
    The user is set in the console.conf file. To check the user, use grep to return the value:
    # grep \^User /etc/dirsrv/admin-serv/console.conf
    The configuration file should be readable by the Administration Server user and no other users, so consider resetting the permissions on the file:
    # chmod 0400 filename
To view in-progress status of replication in Admin Express:
  1. Create a configuration file. The configuration file lists all of the servers to monitor for replication, giving their host name or IPv4 or IPv6 address, port, the bind credentials to use, and then optional settings for aliases and time lag colors.
    #Configuration File for Monitoring Replication Using Admin Express
    	[connection] Required. Gives the server host (or IPv4 or IPv6 address), port, supplier bind DN, and password.  
    host1.example.com:389:cn=replication manager:mypassword
    host2.example.com:3891:cn=replication manager:altpassword
    
    [alias] Optional. Gives a friendly-name alias to the servers and consumers.  
    M1 = host1.example.com:389
    M2 = host2.example.com:3891
    C1 = host3.example.com:3892
    C2 = host4.example.com:3890
    
    [color] Optional. Sets the color for the time lag boxes.  
    0 = #ccffcc
    5 = #FFFFCC
    60 = #FFCCCC
    The configuration file must be in a directory that is accessible to the Administration Server, and the file must be readable by the Administration Server user. By default, the user is dirsrv.
    The user is set in the console.conf file. To check the user, use grep to return the value:
    # grep \^User /etc/dirsrv/admin-serv/console.conf
    The configuration file should be readable by the Administration Server user and no other users, so consider resetting the permissions on the file:
    # chmod 0400 filename
  2. In the Administration Server web page, click the Admin Express link, and log in.
  3. Click the Replication Status link by the supplier server name.
  4. Type the path to the configuration file in the Configuration file field. Also, set the refresh rate, which is how frequently the replication status page updates; the default is 300 seconds.
    Viewing Replication Status

    Figure 15.5. Viewing Replication Status

  5. Click OK.
The Replication Status page shows the status for sending updates to every consumer listed in the configuration file.
Viewing Replication Status

Figure 15.6. Viewing Replication Status

Table Description
Table header The table header shows the replica ID of the supplier replica, the replicated suffix root (such as dc=example,dc=com), and the maximum change state number (CSN) on the supplier. (The CSN is the ID of the latest change on the supplier, while the max CSN for the supplier shows the last update it received.)
Max CSN The ID number of the most recent CSN the consumer has received that originated from the supplier.
Time lag How long it takes for the consumer to receive updates from the supplier; this is the time difference between the supplier and the consumer's max CSNs. When a consumer is in sync with its supplier, the time lag is 0.
Last Modify Time Gives the time of the last update for the consumer (the time the last CSN entry was sent).
Supplier Gives the name of the supplier sending updates to that consumer; this can be useful if a consumer receives updates from multiple suppliers or there are multiple suppliers being monitored on the Replication Status page.
Sent/Skipped The number of changes that were sent from the supplier and the number skipped in the replication update. The numbers are kept in suppliers' memory only and are cleared if the supplier is restarted.
Update Status The status code (and meaning) for the last update. This column can indicate a possible deadlock if all the suppliers complain that they cannot acquire a busy replica. It is normal for there to be a busy message if one of the suppliers is doing an update.
Update Start and End The timestamps for when the most recent update process started and ended.
Schedule The configured replication schedule. 0:-: means that the consumer is continually updated by the supplier.
SSL? Indicates whether the supplier connects to the consumer over TLS.

15.23.3. Monitoring Replication from the Command-Line

To display replication status from the command line, run the /usr/bin/repl-monitor.pl script with the -s option added. The script prints the report in plain text format and is useful, for example, in situations when the user wants to quickly determine the replication status but a browser is not available. Similarly to Admin Express described in Section 15.23.2, “Monitoring Replication from Admin Express”, repl-monitor.pl shows replication status in real-time.
The repl-monitor.pl script accepts a number of command-line options. For more information on how to use it, see the repl-monitor(1) man page or the Directory Server Configuration, Command, and File Reference guide.

Note

When run without the -s option, repl-monitor.pl generates the report as an HTML file.