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
Copy file name to clipboardExpand all lines: documentation/configuration_file.md
+21
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,8 @@ All parameters must be specified in the `parameter = value` format.
10
10
11
11
> **_NOTE:_** It is necessary to check permissions to the _mamonsu_ user to directories/files for correct interaction of agent with them. By default configuration file _agent.conf_ should have read/write permissions for _mamonsu_ user only.
12
12
13
+
> **_NOTE:_** Config file supports string interpolation via _%()s_ syntax in parameter values. please see “[Parameter Values Interpolation](#parameter-values-interpolation)” below.
14
+
13
15
***
14
16
15
17
### Connection Parameters
@@ -237,3 +239,22 @@ By default this plugin is disabled. To enable it set the enabled parameter to Tr
237
239
This plugin collects two metrics: *pg_probackup.dir.size[#backup_directory]* (the size of the target directory) and *pg_probackup.dir.error[#backup_directory]* (backup errors) for each specified *backup_directory*.
238
240
239
241
If any generated backup has bad status, like ERROR, CORRUPT, ORPHAN, а trigger is fired.
242
+
243
+
### Parameter Values Interpolation
244
+
245
+
Mamonsu uses python3 built-in configparser library which allows defining arbitary variables in any config section and then reuse it within the same config section.
246
+
247
+
Example:
248
+
```editorconfig
249
+
[postgres]
250
+
pg = postgres
251
+
enabled = True
252
+
user = %(pg)s
253
+
password = %(pg)s
254
+
database = %(pg)s
255
+
port = 5432
256
+
application_name = %(pg)s
257
+
query_timeout = 10
258
+
```
259
+
260
+
What is important to note here is that you cannot use symbol _%_ in any parameter's value since it will be treated as an interolation syntax.
0 commit comments