Skip to content

Commit 39d7ca2

Browse files
committed
doc: updated documentation
1 parent 4bcebf5 commit 39d7ca2

26 files changed

+638
-617
lines changed

README.md

Lines changed: 67 additions & 57 deletions
Large diffs are not rendered by default.

documentation/adding_custom_plugins.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# Mamonsu: adding custom plugins
1+
# mamonsu: adding custom plugins
22

3-
You can extend Mamonsu with your own custom plugins, as follows:
3+
You can extend _mamonsu_ with your own custom plugins as follows:
44

5-
1. Save all custom plugins in a single directory, such as */etc/mamonsu/plugins*.
5+
1. Save all custom plugins in a single directory such as */etc/mamonsu/plugins*.
66
2. Make sure this directory is specified in your configuration file under the [plugins] section:
77
```editorconfig
88
[plugins]
@@ -12,13 +12,13 @@ You can extend Mamonsu with your own custom plugins, as follows:
1212
```shell
1313
mamonsu export template template.xml --add-plugins=/etc/mamonsu/plugins
1414
```
15-
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)”.
1616
1717
***
1818
1919
## How to write custom plugin
2020
21-
Plugins have a fixed structure:
21+
Plugin have a fixed structure:
2222
```python
2323
# all possible elements are listed here, but they are optional and it is not necessary to add all of them
2424
@@ -161,4 +161,5 @@ class PLUGIN_NAME(Plugin):
161161
return template_zabbix.key_and_query(result)
162162
```
163163

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).

documentation/configuration_file.md

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Mamonsu: configuration file
1+
# mamonsu: configuration file
22

33
## Configuration Parameters
44
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
88

99
All parameters must be specified in the `parameter = value` format.
1010

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.
1212
1313
***
1414

@@ -45,12 +45,12 @@ The [postgres] section controls PostgreSQL metrics collection and can contain th
4545
        Default: 5432
4646

4747
**application_name**
48-
        Application name that identifies Mamonsu connected to the PostgreSQL cluster.
48+
        Application name that identifies _mamonsu_ connected to the PostgreSQL cluster.
4949

5050
        Default: mamonsu
5151

5252
**query_timeout**
53-
        [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.
5454

5555
        Default: 10
5656

@@ -95,20 +95,20 @@ The [zabbix] section provides connection settings for the Zabbix server and can
9595
<p>&nbsp;</p>
9696

9797
**[agent]**
98-
The [agent] section specifies the location of Mamonsu and whether it is allowed to access metrics from the command line:
98+
The [agent] section specifies the location of _mamonsu_ and whether it is allowed to access metrics from the command line:
9999

100100
**enabled**
101101
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Enables/disables metrics collection from the command line using the agent command.
102102

103103
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Default: True
104104

105105
**host**
106-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The address of the system on which Mamonsu is running.
106+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The address of the system on which _mamonsu_ is running.
107107

108108
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Default: 127.0.0.1
109109

110110
**port**
111-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The port on which Mamonsu is running.
111+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The port on which _mamonsu_ is running.
112112

113113
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Default: 10052
114114

@@ -118,7 +118,7 @@ The [agent] section specifies the location of Mamonsu and whether it is allowed
118118
The [sender] section controls the queue size of the data to be sent to the Zabbix server:
119119

120120
**queue**
121-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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.
122122

123123
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Default: 2048
124124

@@ -130,7 +130,7 @@ The [sender] section controls the queue size of the data to be sent to the Zabbi
130130
The [metric_log] section enables storing the collected metric data in text files locally. This section can contain the following parameters:
131131

132132
**enabled**
133-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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.
134134

135135
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Default: False
136136

@@ -139,23 +139,20 @@ The [metric_log] section enables storing the collected metric data in text files
139139

140140
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Default: /var/log/mamonsu
141141

142-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Permissions: mamonsu:mamonsu rwxrwx
143142

144143
**max_size_mb**
145-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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.
146145

147146
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Default: 1024
148147

149148
<p>&nbsp;</p>
150149

151150
**[log]**
152-
The [log] section specifies logging settings for Mamonsu and can contain the following parameters:
151+
The [log] section specifies logging settings for _mamonsu_ and can contain the following parameters:
153152

154153
**file**
155154
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Specifies the log filename, which can be preceded by the full path.
156155

157-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Permissions: mamonsu:mamonsu rw-r--
158-
159156
**level**
160157
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Specifies the debug level. This option can take DEBUG, ERROR, or INFO values.
161158

@@ -181,18 +178,16 @@ The [plugins] section specifies custom plugins to be added for metrics collectio
181178
**directory**
182179
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Specifies the directory that contains custom plugins for metrics collection. Setting this parameter to None forbids using custom plugins.
183180

184-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Default: /etc/mamonsu/plugins
185-
186-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Permissions: mamonsu:mamonsu rwxrwx
181+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Default: /etc/mamonsu/plugins
187182

188-
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.
189184

190185
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)”.
191186

192187
***
193188

194189
### 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.
196191

197192
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.
198193

@@ -208,9 +203,10 @@ interval = 300
208203
backup_dirs = /backup_dir1,/backup_dir2
209204
pg_probackup_path = /usr/bin/pg_probackup-11
210205
```
206+
Let's take a closer look at these examples:
211207

212208
**[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).
214210

215211
The *max_prepared_transaction_time parameter* specifies the threshold in seconds for the age of the prepared transaction.
216212

923 KB
Loading
397 KB
Loading
94.9 KB
Loading
1.75 KB
Loading
511 KB
Loading
235 KB
Loading
293 KB
Loading
Loading
259 KB
Loading
177 KB
Loading

0 commit comments

Comments
 (0)