How do I monitor replication?

Aaron Rhodes
2022-04-11 11:42

There is no MBean that will monitor replication. We are continuing to improve how replication is monitored though, so it is a good idea to review our release notes as we release new versions of Artifactory. What most customers do right now is do periodic checks to approximate if replication is not functioning. Replication status can be checked at any time using this REST call.

The cause of a replication failure can be one of three reasons:

  1. There is/was a storage problem that caused an IOException which will halt the task (and usually the whole server). You can prevent this by setting your disk thresholds and you want to prevent this rather than react to it.
  2. There is/was a network problem that halted the replication task between the servers. You will be able to spot these by looking in the logs for SocketExceptions and the like. This is generally reacted to rather than prevented due to the nature of networks.
  3. Replication took too long and the job is stuck somehow. We have had bugs in the past that have caused this, so try to stay as up-to-date with the Artifactory version you are using as possible to prevent. To detect you can periodically use the replication status REST API

What you can also do is monitor the delta of your replication by querying storage results of each server using this REST call. If the delta exceeds your threshold you would get an alert. Another way is to capture the replication job results from the artifactory.log and see if the results match your expectations.