You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- ``alerts`` -- warnings or errors raised on an attempt to apply the configuration
163
163
164
-
**Examples:**
164
+
Below are a few examples demonstrating how the ``info()`` output might look.
165
+
166
+
**Example: no configuration errors**
167
+
168
+
In the example below, an instance's state is ``ready`` and no warnings are shown:
169
+
170
+
.. code-block:: tarantoolsession
171
+
172
+
app:instance001> require('config'):info('v2')
173
+
---
174
+
- status: ready
175
+
meta:
176
+
last: &0 []
177
+
active: *0
178
+
alerts: []
179
+
...
180
+
181
+
**Example: configuration warnings**
182
+
183
+
In the example below, the instance's state is ``check_warnings``.
184
+
The ``alerts`` section informs that privileges to the ``bands`` space for ``sampleuser`` cannot be granted because the ``bands`` space has not created yet:
185
+
186
+
.. code-block:: tarantoolsession
187
+
188
+
app:instance001> require('config'):info('v2')
189
+
---
190
+
- status: check_warnings
191
+
meta:
192
+
last: &0 []
193
+
active: *0
194
+
alerts:
195
+
- type: warn
196
+
message: box.schema.user.grant("sampleuser", "read,write", "space", "bands") has
197
+
failed because either the object has not been created yet, a database schema
198
+
upgrade has not been performed, or the privilege write has failed (separate
199
+
alert reported)
200
+
timestamp: 2024-07-03T18:09:18.826138+0300
201
+
...
202
+
203
+
This warning is cleared when the ``bands`` space is created.
204
+
205
+
**Example: configuration errors**
206
+
207
+
In the example below, the instance's state is ``check_errors``.
208
+
The ``alerts`` section informs that the ``log.level`` configuration option has an incorrect value:
209
+
210
+
.. code-block:: tarantoolsession
211
+
212
+
app:instance001> require('config'):info('v2')
213
+
---
214
+
- status: check_errors
215
+
meta:
216
+
last: []
217
+
active: []
218
+
alerts:
219
+
- type: error
220
+
message: '[cluster_config] log.level: Got 8, but only the following values are
In this example, an instance's state includes information about a :ref:`centralized storage <configuration_etcd>` the instance takes a configuration from:
229
+
230
+
.. code-block:: tarantoolsession
231
+
232
+
app:instance001> require('config'):info('v2')
233
+
---
234
+
- status: check_errors
235
+
meta:
236
+
last:
237
+
etcd:
238
+
mod_revision:
239
+
/myapp/config/all: 5
240
+
revision: 5
241
+
active:
242
+
etcd:
243
+
mod_revision:
244
+
/myapp/config/all: 2
245
+
revision: 4
246
+
alerts:
247
+
- type: error
248
+
message: 'etcd source: invalid config at key "/myapp/config/all": [cluster_config]
8, but only the following values are allowed: 0, fatal, 1, syserror, 2, error,
251
+
3, crit, 4, warn, 5, info, 6, verbose, 7, debug'
252
+
timestamp: 2024-07-03T15:22:06.438275Z
253
+
...
165
254
166
-
Below are a few examples demonstrating how the ``info()`` output might look:
167
-
168
-
* In the example below, an instance's state is ``ready`` and no warnings are shown:
169
-
170
-
.. code-block:: console
171
-
172
-
app:instance001> require('config'):info()
173
-
---
174
-
- status: ready
175
-
meta: []
176
-
alerts: []
177
-
...
178
-
179
-
* In the example below, the instance's state is ``check_warnings``.
180
-
The ``alerts`` section informs that privileges to the ``books`` space for ``sampleuser`` cannot be granted because the ``books`` space has not been created yet:
181
-
182
-
.. code-block:: console
183
-
184
-
app:instance001> require('config'):info()
185
-
---
186
-
- status: check_warnings
187
-
meta: []
188
-
alerts:
189
-
- type: warn
190
-
message: box.schema.user.grant("sampleuser", "read,write", "space", "books") has
191
-
failed because either the object has not been created yet, or the privilege
192
-
write has failed (separate alert reported)
193
-
timestamp: 2024-02-27T15:07:41.815785+0300
194
-
...
195
-
196
-
This warning is cleared when the ``books`` space is created.
197
-
198
-
* In the example below, the instance's state is ``check_errors``.
199
-
The ``alerts`` section informs that the ``log.level`` configuration option has an incorrect value:
200
-
201
-
.. code-block:: console
202
-
203
-
app:instance001> require('config'):info()
204
-
---
205
-
- status: check_errors
206
-
meta: []
207
-
alerts:
208
-
- type: error
209
-
message: '[cluster_config] log.level: Got 8, but only the following values are
* In this example, an instance's state includes information about a :ref:`centralized storage <configuration_etcd>` the instance takes a configuration from:
0 commit comments