Skip to content

Commit 7e6db17

Browse files
committed
Merge branch 'dev'
2 parents f8404a0 + 071c113 commit 7e6db17

File tree

8 files changed

+267
-7
lines changed

8 files changed

+267
-7
lines changed

.github/workflows/mamonsu-tests-dev.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959
echo "::set-output name=zabbix_address::$(hostname -I | awk '{print $1}')"
6060
id: zabbix_address
6161
- name: Edit Zabbix address in agent.conf
62-
run: sed -i "s/\(address *= *\).*/\1 ${{ steps.zabbix_address.outputs.zabbix_address }}/" ${{ env.MAMONSU_PATH }}/github-actions-tests/sources/agent_3.4.0.conf
62+
run: sed -i "s/\(address *= *\).*/\1 ${{ steps.zabbix_address.outputs.zabbix_address }}/" ${{ env.MAMONSU_PATH }}/github-actions-tests/sources/agent_3.5.0.conf
6363

6464
- name: Copy test scripts to container
6565
run: docker exec $( echo "${{ matrix.docker_os }}" | sed 's/://' | sed 's/\.//' ) mkdir -p -m 755 /mamonsu/

.github/workflows/mamonsu-tests-master.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jobs:
6363
echo "::set-output name=zabbix_address::$(hostname -I | awk '{print $1}')"
6464
id: zabbix_address
6565
- name: Edit Zabbix address in agent.conf
66-
run: sed -i "s/\(address *= *\).*/\1 ${{ steps.zabbix_address.outputs.zabbix_address }}/" ${{ env.MAMONSU_PATH }}/github-actions-tests/sources/agent_3.4.0.conf
66+
run: sed -i "s/\(address *= *\).*/\1 ${{ steps.zabbix_address.outputs.zabbix_address }}/" ${{ env.MAMONSU_PATH }}/github-actions-tests/sources/agent_3.5.0.conf
6767

6868
- name: Copy test scripts to container
6969
run: docker exec $( echo "${{ matrix.docker_os }}" | sed 's/://' | sed 's/\.//' ) mkdir -p -m 755 /mamonsu/

github-actions-tests/mamonsu_build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ if [ "${OS%:*}" = "centos" ]; then
4141
python3 setup.py build && python3 setup.py install
4242
make rpm
4343
sudo rpm -i ./mamonsu*.rpm
44-
cat /mamonsu/github-actions-tests/sources/agent_3.4.0.conf > /etc/mamonsu/agent.conf
44+
cat /mamonsu/github-actions-tests/sources/agent_3.5.0.conf > /etc/mamonsu/agent.conf
4545
systemctl daemon-reload
4646
systemctl restart mamonsu
4747
sleep 5
@@ -64,7 +64,7 @@ elif [ "${OS%:*}" = "ubuntu" ]; then
6464
python3 setup.py build && python3 setup.py install
6565
make deb
6666
sudo dpkg -i ./mamonsu*.deb
67-
cat /mamonsu/github-actions-tests/sources/agent_3.4.0.conf > /etc/mamonsu/agent.conf
67+
cat /mamonsu/github-actions-tests/sources/agent_3.5.0.conf > /etc/mamonsu/agent.conf
6868
service mamonsu restart
6969
sleep 5
7070
echo && echo && echo "mamonsu version:"
Lines changed: 216 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,216 @@
1+
# This is a configuration file for mamonsu
2+
# To get more information about mamonsu, visit https://postgrespro.ru/docs/postgrespro/12/mamonsu
3+
4+
######### Connection parameters sections ##############
5+
6+
# specify connection parameters for the Postgres cluster
7+
# in the user, password, and database fields, you must specify the mamonsu_user, mamonsu_password,
8+
# and the mamonsu_database used for bootstrap, respectively.
9+
# if you skipped the bootstrap, specify a superuser credentials and the database to connect to.
10+
11+
[postgres]
12+
enabled = True
13+
user = mamonsu
14+
password = mamonsu
15+
database = mamonsu_test_db
16+
host = localhost
17+
port = 5432
18+
application_name = mamonsu
19+
query_timeout = 10
20+
21+
# the address field must point to the running Zabbix server, while the client field must provide the name of
22+
# the Zabbix host. You can find the list of hosts available for your account in the Zabbix web
23+
# interface under Configuration > Hosts.
24+
# re_send - True - in case of transmission error, mamonsu repeats sending metrics one by one to look in log metrics with error
25+
26+
[zabbix]
27+
enabled = True
28+
client = pg-master
29+
address = 127.0.0.1
30+
port = 10051
31+
timeout = 15
32+
re_send = False
33+
34+
######### General parameters sections ############
35+
36+
# enable or disable collection of system metrics.
37+
38+
[system]
39+
enabled = True
40+
41+
# control the queue size of the data to be sent to the Zabbix server
42+
43+
[sender]
44+
queue = 2048
45+
46+
# specify the location of mamonsu and whether it is allowed to access metrics from the command line
47+
48+
[agent]
49+
enabled = True
50+
host = 127.0.0.1
51+
port = 10052
52+
53+
# specify custom plugins to be added for metrics collection
54+
55+
[plugins]
56+
enabled = False
57+
directory = /etc/mamonsu/plugins
58+
59+
# enable storing the collected metric data in text files locally.
60+
61+
[metric_log]
62+
enabled = False
63+
directory = /var/log/mamonsu
64+
max_size_mb = 1024
65+
66+
# specify logging settings for mamonsu
67+
68+
[log]
69+
file = /var/log/mamonsu/mamonsu.log
70+
level = DEBUG
71+
format = [%(levelname)s] %(asctime)s - %(name)s - %(message)s
72+
73+
######### Individual Plugin Sections ############
74+
75+
# to disable any plugin set the enabled option to False.
76+
# modify collection interval for each plugin in the interval field.
77+
# set customer parameters for some plugins in the individual section.
78+
# below listed all available parameters for each plugin to modify.
79+
80+
[health]
81+
max_memory_usage = 41943040
82+
interval = 15
83+
84+
[bgwriter]
85+
interval = 15
86+
87+
[connections]
88+
percent_connections_tr = 90
89+
interval = 15
90+
91+
[databases]
92+
bloat_scale = 0.2
93+
min_rows = 50
94+
interval = 15
95+
96+
[pghealth]
97+
uptime = 600
98+
cache = 80
99+
interval = 15
100+
101+
[instance]
102+
interval = 15
103+
104+
[xlog]
105+
lag_more_than_in_sec = 300
106+
interval = 15
107+
108+
[statements]
109+
interval = 15
110+
111+
[pgbuffercache]
112+
interval = 15
113+
114+
[waitsampling]
115+
interval = 15
116+
117+
[checkpoint]
118+
max_checkpoint_by_wal_in_hour = 12
119+
interval = 15
120+
121+
[oldest]
122+
max_xid_age = 18000000
123+
max_query_time = 18000
124+
interval = 15
125+
126+
[pglocks]
127+
interval = 15
128+
129+
[cfs]
130+
force_enable = False
131+
interval = 15
132+
133+
[archivecommand]
134+
max_count_files = 2
135+
interval = 15
136+
137+
[procstat]
138+
interval = 15
139+
140+
[diskstats]
141+
interval = 15
142+
143+
[disksizes]
144+
vfs_percent_free = 10
145+
vfs_inode_percent_free = 10
146+
interval = 15
147+
148+
[memory]
149+
interval = 15
150+
151+
[systemuptime]
152+
up_time = 300
153+
interval = 15
154+
155+
[openfiles]
156+
interval = 15
157+
158+
[net]
159+
interval = 15
160+
161+
[la]
162+
interval = 15
163+
164+
[zbxsender]
165+
interval = 10
166+
167+
[logsender]
168+
interval = 2
169+
170+
[agentapi]
171+
interval = 15
172+
173+
# Get age (in seconds) of the oldest running prepared transaction and number of all prepared transactions for two-phase commit.
174+
# https://www.postgresql.org/docs/current/sql-prepare-transaction.html
175+
# https://www.postgresql.org/docs/12/view-pg-prepared-xacts.html
176+
# max_prepared_transaction_time - age of prepared transaction in seconds.
177+
# If pgsql.prepared.oldest exceeds max_prepared_transaction_time the trigger fires.
178+
[preparedtransaction]
179+
max_prepared_transaction_time = 60
180+
interval = 15
181+
182+
# Get size of backup catalogs stroring all WAL and backup files using pg_probackup
183+
# (https://github.com/postgrespro/pg_probackup)
184+
# Trigger fires if some backup has bad status e.g. (ERROR,CORRUPT,ORPHAN).
185+
[pgprobackup]
186+
enabled = False
187+
interval = 300
188+
backup_dirs = /backup_dir1,/backup_dir2
189+
pg_probackup_path = /usr/bin/pg_probackup-11
190+
191+
# Get size of relations defined in this section
192+
# Relations - comma separated list of objects - tables and endexes (database_name.schema.relation) used to calculate relations size.
193+
# Example:
194+
# relations=postgres.pg_catalog.pg_class,postgres.pg_catalog.pg_user
195+
# If the relation is blocked by some process such as vacuum full or create index, the result will be -1
196+
# by default this plugin disabled. To enable this plugin - set bellow "enabled = False" and define a list of relations.
197+
[relationssize]
198+
enabled = True
199+
relations=postgres.pg_catalog.pg_class,mamonsu_test_db.mamonsu.config
200+
interval = 15
201+
202+
# This plugin allows detects possible memory leaks while working with PostgreSQL using /proc/pid/status and /proc/pid/statm
203+
# We use RES and SHR difference to calculate approximate volume of private anonymous backend memory.
204+
# If it exceeds private_anon_mem_threshold then that pid will be added to a message. An example is presented below
205+
# statm - 'pid: {pid}, RES {RES} - SHR {SHR} more then {private_anon_mem_threshold}\n'
206+
# Since Linux 4.5 RssAnon, RssFile and RssShmem have been added.
207+
# They allows to distinguish types of memory such as private anonymous, file-backed, and shared anonymous memory.
208+
# We are interested in RssAnon. If its value exceeds private_anon_mem_threshold then that pid will also be added to a message.
209+
# By default this plugin disabled. To enable this plugin - set bellow "enabled = False"
210+
# #interval - (onitoring frequency in seconds. 60 seconds by default
211+
# private_anon_mem_threshold - memory volume threshold after which we need an investigation about memory leak. 1GB by default.
212+
# Possible values MB, GB, TB. For example 1GB
213+
[memoryleakdiagnostic]
214+
enabled = True
215+
interval = 15
216+
private_anon_mem_threshold = 1GB

mamonsu/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
__author__ = 'Dmitry Vasilyev'
22
__author_email__ = '[email protected]'
33
__description__ = 'Monitoring agent for PostgreSQL'
4-
__version__ = '3.4.0'
4+
__version__ = '3.5.0'
55
__licence__ = 'BSD'
66

77
__url__ = 'https://github.com/postgrespro/mamonsu'

packaging/debian/changelog

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,25 @@
1+
mamonsu (3.5.0-1) stable; urgency=low
2+
* divided Instance Rate graph into two graphs - Blocks Rate, Transactions Rate;
3+
* divided XLOG plugin into two plugins - WAL, Replication;
4+
* changed 'pg_wait_sampling' plugin name to 'Wait Sampling';
5+
* changed 'pg_stat_statements' plugin name to 'Statements';
6+
* changed default agent.conf file permissions: now it read/write only for mamonsu user;
7+
* added new Replication plugin metrics: Send Lag, Receive Lagadded pgpro_stats support to PostgresPro cluster (automatic switch from pg_stat_statements and pg_wait_sampling);
8+
* added new bootstrap features: now the '-x' option also configures pg_stat_statements, pg_wait_sampling and pgpro_stats extensions;
9+
* added custom schema check for pg_stat_statements, pg_wait_sampling and pgpro_stats extensions;
10+
* added new lock types to the Wait Sampling plugin to fit PostgreSQL 10+: Extension Locks, Client Locks, Other Locks (e.g. IPC, Timeout, IO), Autovacuum Locks, Logical Replication Locks;
11+
* added new 'System Free/Used Memory' graph;
12+
* added new active locking queries feature to the report tool;
13+
* replaced 'System Memory Overview' graph with 'System Free/Used Memory' in dashboards;
14+
* fixed Statements plugin items generation for native zabbix agent;
15+
* fixed Rollbacks item delta type;
16+
* fixed WAL metrics delta types;
17+
* fixed PostgreSQL Uptime trigger;
18+
* improved Replication metrics evaluation algorithm;
19+
* unified Zabbix objects names;
20+
* unified config file sections and parameters names;
21+
* set new color scheme;
22+
123
mamonsu (3.4.0-1) stable; urgency=low
224
* added Server Version metric;
325
* added Available Memory metric;

packaging/rpm/SPECS/mamonsu.spec

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Name: mamonsu
2-
Version: 3.4.0
2+
Version: 3.5.0
33
Release: 1%{?dist}
44
Summary: Monitoring agent for PostgreSQL
55
Group: Applications/Internet
@@ -73,6 +73,28 @@ chown -R mamonsu.mamonsu /var/log/mamonsu
7373
chown -R mamonsu.mamonsu /etc/mamonsu
7474

7575
%changelog
76+
* Wed Jul 6 2022 Alexandra Kuznetsova <[email protected]> - 3.5.0-1
77+
- divided Instance Rate graph into two graphs - Blocks Rate, Transactions Rate;
78+
- divided XLOG plugin into two plugins - WAL, Replication;
79+
- changed 'pg_wait_sampling' plugin name to 'Wait Sampling';
80+
- changed 'pg_stat_statements' plugin name to 'Statements';
81+
- changed default agent.conf file permissions: now it read/write only for mamonsu user;
82+
- added new Replication plugin metrics: Send Lag, Receive Lagadded pgpro_stats support to PostgresPro cluster (automatic switch from pg_stat_statements and pg_wait_sampling);
83+
- added new bootstrap features: now the '-x' option also configures pg_stat_statements, pg_wait_sampling and pgpro_stats extensions;
84+
- added custom schema check for pg_stat_statements, pg_wait_sampling and pgpro_stats extensions;
85+
- added new lock types to the Wait Sampling plugin to fit PostgreSQL 10+: Extension Locks, Client Locks, Other Locks (e.g. IPC, Timeout, IO), Autovacuum Locks, Logical Replication Locks;
86+
- added new 'System Free/Used Memory' graph;
87+
- added new active locking queries feature to the report tool;
88+
- replaced 'System Memory Overview' graph with 'System Free/Used Memory' in dashboards;
89+
- fixed Statements plugin items generation for native zabbix agent;
90+
- fixed Rollbacks item delta type;
91+
- fixed WAL metrics delta types;
92+
- fixed PostgreSQL Uptime trigger;
93+
- improved Replication metrics evaluation algorithm;
94+
- unified Zabbix objects names;
95+
- unified config file sections and parameters names;
96+
- set new color scheme;
97+
7698
* Mon Feb 21 2022 Alexandra Kuznetsova <[email protected]> - 3.4.0-1
7799
- added Server Version metric;
78100
- added Available Memory metric;

packaging/win/mamonsu.def.nsh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
!define NAME Mamonsu
2-
!define VERSION 3.4.0
2+
!define VERSION 3.5.0
33
!define MAMONSU_REG_PATH "Software\PostgresPro\Mamonsu"
44
!define MAMONSU_REG_UNINSTALLER_PATH "Software\Microsoft\Windows\CurrentVersion\Uninstall"
55
!define EDB_REG "SOFTWARE\Postgresql"

0 commit comments

Comments
 (0)