Перейти к содержимому

Check replication status

Это содержимое пока не доступно на вашем языке.

On a switch with a hot stand-by server, the database is replicated from the leader host to the follower host. These methods tell you whether replication is on, which hosts take part and how far the follower lags behind. Use them in your monitoring. Only the root customer may call them.

The methods support trusted mode with i_customer.

Returns the replication setup and whether it is healthy.

Name Type Required Description
i_environment int yes Environment to check
Name Type Description
result string OK
replication_enabled boolean True when replication is on
master string The leader host
slave string The follower host
replication_ok boolean True when there is no replication lag
request
call("getReplicationStatus", {"i_environment": 1})
response
{
"result": "OK",
"replication_enabled": True,
"master": "192.0.2.10",
"slave": "192.0.2.11",
"replication_ok": True,
}

Returns the replication lag, measured in two ways.

Name Type Required Description
i_environment int yes Environment to check
Name Type Description
result string OK
st_lag_time string Lag reported by the replication engine
replication_test_lag string Lag measured with a test record written on the leader and read on the follower
request
call("getReplicationLag", {"i_environment": 1})
response
{"result": "OK", "st_lag_time": "00:00:02", "replication_test_lag": "00:00:01"}