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
Based by zabbix, Mamonsu provides an extensible cross-platform solution that can collect and visualize multiple PostgreSQL and system metrics. Mamonsu has about 100 PostgreSQL metrics and about 30 system metrics. Mamonsu collects [metrics](documentation/metrics.md) such as database availability, number of connections, locks, WAL problems, checkpoints, background writer activity, memory problems and many others. Unlike the native Zabbix Agent configured to collect PostgreSQL metrics, Mamonsu uses a single database connection, which minimizes performance impact on the monitored system. Mamonsu also contains a number of [tools](documentation/tools.md) for interacting with the Zabbix API, obtaining system information and information about collected metrics.
41
+
Based by Zabbix, Mamonsu provides an extensible cross-platform solution that can collect and visualize multiple PostgreSQL and system metrics. Mamonsu has about 100 PostgreSQL metrics and about 30 system metrics. Mamonsu collects [metrics](documentation/metrics.md) such as database availability, number of connections, locks, WAL problems, checkpoints, background writer activity, memory problems and many others. Unlike the native Zabbix Agent configured to collect PostgreSQL metrics, Mamonsu uses a single database connection, which minimizes performance impact on the monitored system. Mamonsu also contains a number of [tools](documentation/tools.md) for interacting with the Zabbix API, obtaining system information and information about collected metrics.
42
42
Mamonsu is written entirely in Python and has a plugin architecture. It is an active agent, which means that it sends the data to the Zabbix server once it is collected. Pre-configured to monitor multiple PostgreSQL and system metrics out of the box, Mamonsu can be extended with your own [custom plugins](documentation/adding_custom_plugins.md) to track other metrics critical for your system.
43
43
Mamonsu can be installed on the same server where the DBMS we are going to watch is located or on remote server, but:
44
44
> **_NOTE:_** While Mamonsu can collect PostgreSQL metrics from a remote server, system metrics are only collected locally. If you choose to collect PostgreSQL metrics remotely, make sure to disable collection of system metrics to avoid confusion, as they will be displayed under the same host in Zabbix.
To use Mamonsu, you must create a Zabbix account and set up a Zabbix server as explained in [Zabbix documentation](https://www.zabbix.com/documentation/current/). Naturally, you must also have a PostgreSQL instance up and running if you are going to monitor PostgreSQL metrics.
135
-
A pre-built Mamonsu package is provided in official Postgres Pro repository.
For details of usage, see “[Tools](documentation/tools.md#bootstrap)".
203
-
As the result of this operation, monitoring functions are created in the mamonsu_database in *mamonsu* schema, and the right to execute them is granted to the mamonsu_user. Thus, a superuser connection is no longer required. Mamonsu also creates several tables in the specified database. Do not delete these tables as they are required for Mamonsu to work.
170
+
As the result of this operation, monitoring functions are created in the *mamonsu_database* in *mamonsu* schema, and the right to execute them is granted to the *mamonsu_user*. Thus, a superuser connection is no longer required. Mamonsu also creates several tables in the specified database. Do not delete these tables as they are required for Mamonsu to work.
204
171
2. **Configure Mamonsu**
205
-
Edit the agent.conf configuration file.
172
+
Edit the *agent.conf* configuration file.
206
173
Configure Zabbix-related settings. The address field must point to the running Zabbix server, while the client field must provide the name of the Zabbix host. You can find the list of hosts available for your account in the Zabbix web interface under Configuration > Hosts.
207
174
```editorconfig
208
175
[zabbix]
@@ -211,13 +178,13 @@ As the result of this operation, monitoring functions are created in the mamonsu
211
178
client = zabbix_host_name
212
179
address = zabbix_server
213
180
```
214
-
By default, Mamonsu will collect both PostgreSQL and system metrics. If required, you can disable metrics collection of either type by setting the enabled parameter to False in the [postgres] or [system] section of the agent.conf file, respectively.
181
+
By default, Mamonsu will collect both PostgreSQL and system metrics. If required, you can disable metrics collection of either type by setting the enabled parameter to False in the [postgres] or [system] section of the *agent.conf* file, respectively.
215
182
```editorconfig
216
183
[system]
217
184
; enabled by default
218
185
enabled = True
219
186
```
220
-
If you are going to collect PostgreSQL metrics, specify connection parameters for the PostgreSQL server you are going to monitor. In the user, password and database fields, you must specify the mamonsu_user, mamonsu_password and the mamonsu_database used for bootstrap, respectively. If you skipped the bootstrap, specify a superuser credentials and the database to connect to.
187
+
If you are going to collect PostgreSQL metrics, specify connection parameters for the PostgreSQL server you are going to monitor. In the user, password and database fields, you must specify the *mamonsu_user*, *mamonsu_password* and the *mamonsu_database* used for `bootstrap`, respectively. If you skipped the `bootstrap`, specify a superuser credentials and the database to connect to.
221
188
> **_NOTE:_** Mamonsu stores passwords as plain text in its configuration file, so control access to this file.
222
189
```editorconfig
223
190
[postgres]
@@ -234,12 +201,12 @@ As the result of this operation, monitoring functions are created in the mamonsu
234
201
```shell
235
202
mamonsu export template template.xml
236
203
```
237
-
Mamonsu generates the template.xml file in your current directory. By default, the name of the template that will be displayed in the Zabbix account is *Mamonsu PostgreSQL OS*, where *OS* is the name of your operating system. To get a template with a different display name, you can run the above command with the *--template-name* option.
204
+
Mamonsu generates the *template.xml* file in your current directory. By default, the name of the template that will be displayed in the Zabbix account is *Mamonsu PostgreSQL OS*, where *OS* is the name of your operating system. To get a template with a different display name, you can run the above command with the *--template-name* option.
238
205
2. **Optionally, specify your Zabbix account settings** in the following environment variables on your monitoring system:
239
206
- Set the ZABBIX_USER and ZABBIX_PASSWD variables to the login and password of your Zabbix account, respectively.
240
207
- Set the ZABBIX_URL to http://zabbix/
241
208
242
-
If you skip this step, you will have to add the following options to all mamonsu zabbix commands that you run:
209
+
If you skip this step, you will have to add the following options to all `mamonsu zabbix` commands that you run:
@@ -250,7 +217,7 @@ As the result of this operation, monitoring functions are created in the mamonsu
250
217
Alternatively, you can upload the template through the Zabbix web interface: log in to your Zabbix account and select Templates > Import.
251
218
252
219
4. **Link the generated template to the host to be monitored**
253
-
In the Zabbix web interface, select your host, go to Templates > Add, select your template, and click Update. If you would like to link a template with a new Zabbix host, you can do it from the command line using mamonsu zabbix commands. See the section called "[Zabbix cli](documentation/tools.md#zabbix-cli)" for details.
220
+
In the Zabbix web interface, select your host, go to Templates > Add, select your template, and click Update. If you would like to link a template with a new Zabbix host, you can do it from the command line using `mamonsu zabbix` commands. See the section called "[Zabbix cli](documentation/tools.md#zabbix-cli)" for details.
254
221
### Run
255
222
On UNIX-like systems:
256
223
```shell
@@ -277,12 +244,12 @@ Or through the Zabbix web interface:
277
244
278
245
### Best practices
279
246
280
-
**Zabbix host setup only with mamonsu zabbix cli**
247
+
**Zabbix host setup only with `mamonsu zabbix` cli**
281
248
1. Generate a template
282
249
```shell
283
250
mamonsu export template template.xml
284
251
```
285
-
2. Set zabbix variables
252
+
2. Set Zabbix variables
286
253
```shell
287
254
export ZABBIX_USER=Admin
288
255
export ZABBIX_PASSWD=zabbix
@@ -296,7 +263,7 @@ Or through the Zabbix web interface:
296
263
```shell
297
264
mamonsu zabbix host create "pg-host"$(mamonsu zabbix hostgroup id "Linux Servers")$(mamonsu zabbix template id "Mamonsu PostgreSQL Linux")"10.10.0.4"
298
265
```
299
-
This snippet shows how to create Zabbix host called "pg-host" with Mamonsu template in hostgroup "Linux Servers" with address 10.10.0.4.
266
+
This snippet shows how to create Zabbix host called *pg-host* with Mamonsu template in hostgroup *Linux Servers* with address *10.10.0.4*.
300
267
301
268
**Mamonsu setup with remote PostgreSQL**
302
269
1. Generate and upload template
@@ -340,7 +307,7 @@ Or through the Zabbix web interface:
Copy file name to clipboardExpand all lines: documentation/configuration_file.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,12 @@
1
1
# Mamonsu: configuration file
2
2
3
3
## Configuration Parameters
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:
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:
5
5
-[Connection Parameters](#connection-parameters);
6
6
-[Logging parameters](#logging-parameters);
7
7
-[Plugin Parameters](#plugin-parameters).
8
8
9
-
All parameters must be specified in the parameter = value format.
9
+
All parameters must be specified in the `parameter = value` format.
0 commit comments