3.2.3. Management and Monitoring of Multimaster Deployments

To check the configured services use the services parameter to trepctl:

shell> trepctl services
Processing services command...
NAME              VALUE
----              -----
appliedLastSeqno: 44
appliedLatency  : 0.692
role            : master
serviceName     : alpha
serviceType     : local
started         : true
state           : ONLINE
NAME              VALUE
----              -----
appliedLastSeqno: 40
appliedLatency  : 0.57
role            : slave
serviceName     : beta
serviceType     : remote
started         : true
state           : ONLINE
NAME              VALUE
----              -----
appliedLastSeqno: 41
appliedLatency  : 0.06
role            : slave
serviceName     : gamma
serviceType     : remote
started         : true
state           : ONLINE
Finished services command...

The output shows the three individual services created in the multimaster configuration, alpha, beta, and gamma, and information about the current latency, status and role of the current host. This gives you an overview of the service state for this host.

To get detailed information about dataservices, each individual dataservice must be checked individually, and explicitly stated on the command-line to trepctl as there are now multiple dataservices configured. To check the dataservice status the current host will be displayed, in the example below, host1:

shell> trepctl -service alpha status
Processing status command...
NAME                     VALUE
----                     -----
appliedLastEventId     : mysql-bin.000011:0000000000006905;0
appliedLastSeqno       : 44
appliedLatency         : 0.692
channels               : 1
clusterName            : alpha
currentEventId         : mysql-bin.000011:0000000000006905
currentTimeMillis      : 1373891837668
dataServerHost         : host1
extensions             : 
latestEpochNumber      : 28
masterConnectUri       : thl://localhost:/
masterListenUri        : thl://host1:2112/
maximumStoredSeqNo     : 44
minimumStoredSeqNo     : 0
offlineRequests        : NONE
pendingError           : NONE
pendingErrorCode       : NONE
pendingErrorEventId    : NONE
pendingErrorSeqno      : -1
pendingExceptionMessage: NONE
pipelineSource         : jdbc:mysql:thin://host1:13306/
relativeLatency        : 254295.667
resourcePrecedence     : 99
rmiPort                : 10000
role                   : master
seqnoType              : java.lang.Long
serviceName            : alpha
serviceType            : local
simpleServiceName      : alpha
siteName               : default
sourceId               : host1
state                  : ONLINE
timeInStateSeconds     : 254530.987
transitioningTo        : 
uptimeSeconds          : 254532.724
version                : Tungsten Replicator 5.0.1 build 136
Finished status command...

In the above example, the alpha dataservice is explicitly requested (a failure to specify a service will return an error, as multiple services are configured).

To get information about a specific host, use the -host option. This can be used with the trepctl services command:

shell> trepctl -host host3 services 
Processing services command...
NAME              VALUE
----              -----
appliedLastSeqno: 44
appliedLatency  : 1.171
role            : slave
serviceName     : alpha
serviceType     : remote
started         : true
state           : ONLINE
NAME              VALUE
----              -----
appliedLastSeqno: 40
appliedLatency  : 1.658
role            : slave
serviceName     : beta
serviceType     : remote
started         : true
state           : ONLINE
NAME              VALUE
----              -----
appliedLastSeqno: 41
appliedLatency  : 0.398
role            : master
serviceName     : gamma
serviceType     : local
started         : true
state           : ONLINE
Finished services command...

In the above output, you can see that this host is the master for the dataservice gamma, but a slave for the other two services.

Other important fields in this output:

  • appliedLastSeqno and appliedLatency indicate the global transaction ID and latency of the host. These are important when monitoring the status of the cluster to determine how up to date a host is and whether a specific transaction has been applied.

  • role indicates the current role of the host within the scope of the corresponding dataservice.

  • state shows the current status of the host within the scope of the corresponding dataservice.

Or in combination with the -service to get detailed status on a specific host/service combination:

shell> trepctl -host host3 -service alpha status
Processing status command...
NAME                     VALUE
----                     -----
appliedLastEventId     : mysql-bin.000011:0000000000006905;0
appliedLastSeqno       : 44
appliedLatency         : 1.171
channels               : 1
clusterName            : alpha
currentEventId         : NONE
currentTimeMillis      : 1373894128902
dataServerHost         : host3
extensions             : 
latestEpochNumber      : 28
masterConnectUri       : thl://host1:2112/
masterListenUri        : thl://host3:2112/
maximumStoredSeqNo     : 44
minimumStoredSeqNo     : 0
offlineRequests        : NONE
pendingError           : NONE
pendingErrorCode       : NONE
pendingErrorEventId    : NONE
pendingErrorSeqno      : -1
pendingExceptionMessage: NONE
pipelineSource         : thl://host1:2112/
relativeLatency        : 256586.902
resourcePrecedence     : 99
rmiPort                : 10000
role                   : slave
seqnoType              : java.lang.Long
serviceName            : alpha
serviceType            : remote
simpleServiceName      : alpha
siteName               : default
sourceId               : host3
state                  : ONLINE
timeInStateSeconds     : 256820.611
transitioningTo        : 
uptimeSeconds          : 256820.779
version                : Tungsten Replicator 5.0.1 build 136
Finished status command...

The following sequence number combinations should match between the different hosts on each service:

Master Service Master Host Slave Host
alpha host1 host2,host3
beta host2 host1,host3
gamma host3 host1,host2

The sequence numbers on corresponding services should match across all hosts.

For more information on using trepctl, see Section 9.16, “The trepctl Command”.

Definitions of the individual field descriptions in the above example output can be found in Section E.2, “Generated Field Reference”.

For more information on management and operational detailed for managing your cluster installation, see Chapter 8, Operations Guide.