box.info()
box.info()
Get all keys and values provided by the box.info submodule. Since
box.info contents are dynamic, it's not possible to iterate over keys
with the Lua pairs() function. For this purpose, box.info() builds
and returns a Lua table with all keys and values provided in the
submodule.
Returns
keys and values in the submodule
Return type
table
Since version 3.3.0
returns the hierarchy table, showing names of the group, replicaset,
and the instance itself. These names are taken directly from the
--name CLI option (or the TT_INSTANCE_NAME environment variable) and
the cluster configuration. This means they are always present if the
YAML configuration flow is in use, disregarding the database status
(whether upgraded, writable or not).
Example
This example is for a master-replica set that contains one master instance and one replica instance. The request was issued at the replica instance.
sharded_cluster_crud:storage-a-002> box.info()---- version: 3.2.0-entrypoint-218-gf8d77dbecid: 2ro: trueuuid: 5a879b0e-9b53-4053-980a-be1a39ad1166pid: 12059replicaset:uuid: 90dc4d6c-3f7d-45e5-aa5a-55903b0a79c9name: storage-aschema_version: 87listen: 127.0.0.1:3303replication_anon:count: 0replication:1:id: 1uuid: ffb1b8bb-d59f-4eee-ad3e-91058e6f5486lsn: 1092upstream:status: followidle: 0.99728900000082peer: replicator@127.0.0.1:3302lag: 0.00025296211242676name: storage-a-001downstream:status: followidle: 0.18575600000077vclock: {1: 1092}lag: 02:id: 2uuid: 5a879b0e-9b53-4053-980a-be1a39ad1166lsn: 0name: storage-a-002package: Tarantoolhostname: demo.example.comelection:state: followervote: 0leader: 0term: 1signature: 1092synchro:queue:owner: 0confirm_lag: 0term: 0age: 0len: 0busy: falsequorum: 2status: runningsql: []vclock: {1: 1092}uptime: 229lsn: 0vinyl: []ro_reason: configmemory: []gc: []cluster:name: nullname: storage-a-002config:status: readymeta:last: &0 []active: *0alerts: []hierarchy:group: storagesreplicaset: storage-ainstance: storage-a-002...