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
4. Upload the generated template.xml to the Zabbix server as explained in sections “[Installation](../README.md#installation)" and "[Configuration](../README.md#configuration)”.
15
+
4. Upload generated template.xml to the Zabbix server as explained in sections “[Installation](../README.md#installation)" and "[Configuration](../README.md#configuration)”.
16
16
17
17
***
18
18
19
19
## How to write custom plugin
20
20
21
-
Plugins have a fixed structure:
21
+
Plugin have a fixed structure:
22
22
```python
23
23
# all possible elements are listed here, but they are optional and it is not necessary to add all of them
24
24
@@ -161,4 +161,5 @@ class PLUGIN_NAME(Plugin):
161
161
return template_zabbix.key_and_query(result)
162
162
```
163
163
164
-
Native Mamonsu plugins are stored in [mamonsu/plugins](../mamonsu/plugins).
164
+
Native _mamonsu_ plugins are stored in [mamonsu/plugins](../mamonsu/plugins).
165
+
Also you can explore [user examples](../examples).
Copy file name to clipboardExpand all lines: documentation/configuration_file.md
+16-20Lines changed: 16 additions & 20 deletions
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# Mamonsu: configuration file
1
+
# mamonsu: configuration file
2
2
3
3
## Configuration Parameters
4
4
The *agent.conf* configuration file is located in the */etc/mamonsu* directory by default. It provides several groups of parameters that control which metrics to collect and how to log the collected data:
@@ -8,7 +8,7 @@ The *agent.conf* configuration file is located in the */etc/mamonsu* directory b
8
8
9
9
All parameters must be specified in the `parameter = value` format.
10
10
11
-
> **_NOTE:_** It is necessary to give permissions to the mamonsu user to directories/files for correct interaction of agent with them.
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
13
***
14
14
@@ -45,12 +45,12 @@ The [postgres] section controls PostgreSQL metrics collection and can contain th
[statement_timeout](https://postgrespro.com/docs/postgresql/13/runtime-config-client#GUC-STATEMENT-TIMEOUT) for the Mamonsu session, in seconds. If a PostgreSQL metric query does not complete within this time interval, it gets terminated.
53
+
[statement_timeout](https://postgrespro.com/docs/postgresql/14/runtime-config-client#GUC-STATEMENT-TIMEOUT) for the _mamonsu_ session, in seconds. If a PostgreSQL metric query does not complete within this time interval, it gets terminated.
@@ -118,7 +118,7 @@ The [agent] section specifies the location of Mamonsu and whether it is allowed
118
118
The [sender] section controls the queue size of the data to be sent to the Zabbix server:
119
119
120
120
**queue**
121
-
The maximum number of collected metric values that can be accumulated locally before mamonsu sends them to the Zabbix server. Once the accumulated data is sent, the queue is cleared.
121
+
The maximum number of collected metric values that can be accumulated locally before _mamonsu_ sends them to the Zabbix server. Once the accumulated data is sent, the queue is cleared.
@@ -130,7 +130,7 @@ The [sender] section controls the queue size of the data to be sent to the Zabbi
130
130
The [metric_log] section enables storing the collected metric data in text files locally. This section can contain the following parameters:
131
131
132
132
**enabled**
133
-
Enables/disables storing the collected metric data in a text file. If this option is set to True, Mamonsu creates the localhost.log file for storing metric values.
133
+
Enables/disables storing the collected metric data in a text file. If this option is set to True, _mamonsu_ creates the [zabbix.client].log file for storing metric values.
The maximum size of a log file, in MB. When the specified size is reached, it is renamed to localhost.log.archive, and an empty localhost.log file is created.
144
+
The maximum size of a log file, in MB. When the specified size is reached, it is renamed to [zabbix.client].log.archive, and an empty [zabbix.client].log file is created.
Specifies the debug level. This option can take DEBUG, ERROR, or INFO values.
161
158
@@ -181,18 +178,16 @@ The [plugins] section specifies custom plugins to be added for metrics collectio
181
178
**directory**
182
179
Specifies the directory that contains custom plugins for metrics collection. Setting this parameter to None forbids using custom plugins.
If you need to configure any of the plugins you add to Mamonsu after installation, you have to add this plugin section to the agent.conf file.
183
+
If you need to configure any of the plugins you add to _mamonsu_ after installation, you have to add this plugin section to the agent.conf file.
189
184
190
185
The syntax of this section should follow the syntax used with the examples shown below in the section called “[Individual Plugin Sections](#individual-plugin-sections)”.
191
186
192
187
***
193
188
194
189
### Individual Plugin Sections
195
-
All built-in plugins are installed along with Mamonsu. To configure a built-in plugin you should find a corresponding section below the Individual Plugin Sections heading and edit its parameter values.
190
+
All built-in plugins are installed along with _mamonsu_. To configure a built-in plugin you should find a corresponding section below the Individual Plugin Sections heading and edit its parameter values.
196
191
197
192
To disable any plugin you should set the enabled parameter to False and to enable it — set it to True. These values are case sensitive.
198
193
@@ -208,9 +203,10 @@ interval = 300
208
203
backup_dirs = /backup_dir1,/backup_dir2
209
204
pg_probackup_path = /usr/bin/pg_probackup-11
210
205
```
206
+
Let's take a closer look at these examples:
211
207
212
208
**[preparedtransaction]**
213
-
This plugin gets age in seconds of the oldest prepared transaction and number of all transactions prepared for a two-phase commit. For additional information refer to [PREPARE TRANSACTION](https://postgrespro.com/docs/postgresql/13/sql-prepare-transaction) and [pg_prepared_xacts](https://postgrespro.com/docs/postgresql/13/view-pg-prepared-xacts).
209
+
This plugin gets age in seconds of the oldest prepared transaction and number of all transactions prepared for a two-phase commit. For additional information refer to [PREPARE TRANSACTION](https://postgrespro.com/docs/postgresql/14/sql-prepare-transaction) and [pg_prepared_xacts](https://postgrespro.com/docs/postgresql/14/view-pg-prepared-xacts).
214
210
215
211
The *max_prepared_transaction_time parameter* specifies the threshold in seconds for the age of the prepared transaction.
0 commit comments