Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions doc/reference/reference_lua/box_info/config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ box.info.config
The instance's state in regard to configuration.
Note that ``box.info.config`` returns the instance's state obtained using :ref:`config:info('v2') <config_api_reference_info>`.

Since version :doc:`3.3.0 </release/3.3.0>`
Returns the ``hierarchy`` table, showing names of the group, replicaset, and the instance itself.

:rtype: table

**Example**
Expand All @@ -26,4 +29,8 @@ box.info.config
last: &0 []
active: *0
alerts: []
hierarchy:
group: group-001
replicaset: replicaset-001
instance: instance-001
...
7 changes: 7 additions & 0 deletions doc/reference/reference_lua/box_info/info.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ box.info()
:return: keys and values in the submodule
:rtype: table

Since version :doc:`3.3.0 </release/3.3.0>`
Returns the ``hierarchy`` table, showing names of the group, replicaset, and the instance itself.

**Example**

This example is for a master-replica set that contains one master instance
Expand Down Expand Up @@ -94,4 +97,8 @@ box.info()
last: &0 []
active: *0
alerts: []
hierarchy:
group: group-001
replicaset: replicaset-001
instance: instance-001
...
20 changes: 20 additions & 0 deletions doc/reference/reference_lua/config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,10 @@ config API

- ``alerts`` -- warnings or errors raised on an attempt to apply the configuration

Since version :doc:`3.3.0 </release/3.3.0>`

- ``hierarchy`` -- table, showing names of the group, replicaset, and the instance itself.

Below are a few examples demonstrating how the ``info()`` output might look.

**Example: no configuration warnings or errors**
Expand All @@ -174,6 +178,10 @@ config API
last: &0 []
active: *0
alerts: []
hierarchy:
group: group-001
replicaset: replicaset-001
instance: instance-001
...

**Example: configuration warnings**
Expand All @@ -196,6 +204,10 @@ config API
upgrade has not been performed, or the privilege write has failed (separate
alert reported)
timestamp: 2024-07-03T18:09:18.826138+0300
hierarchy:
group: group-001
replicaset: replicaset-001
instance: instance-001
...

This warning is cleared when the ``bands`` space is created.
Expand All @@ -219,6 +231,10 @@ config API
allowed: 0, fatal, 1, syserror, 2, error, 3, crit, 4, warn, 5, info, 6, verbose,
7, debug'
timestamp: 2024-07-03T18:13:19.755454+0300
hierarchy:
group: group-001
replicaset: replicaset-001
instance: instance-001
...

**Example: configuration errors (centralized configuration storage)**
Expand Down Expand Up @@ -248,6 +264,10 @@ config API
8, but only the following values are allowed: 0, fatal, 1, syserror, 2, error,
3, crit, 4, warn, 5, info, 6, verbose, 7, debug'
timestamp: 2024-07-03T15:22:06.438275Z
hierarchy:
group: group-001
replicaset: replicaset-001
instance: instance-001
...


Expand Down