Skip to content

Commit 24b7ab4

Browse files
committed
Merge branch 'dev'
2 parents 4c95b55 + d4611df commit 24b7ab4

File tree

11 files changed

+28
-14
lines changed

11 files changed

+28
-14
lines changed

Diff for: .github/workflows/mamonsu-tests-dev.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
echo "::set-output name=zabbix_address::$(hostname -I | awk '{print $1}')"
5252
id: zabbix_address
5353
- name: Edit Zabbix address in agent.conf
54-
run: sed -i "s/\(address *= *\).*/\1 ${{ steps.zabbix_address.outputs.zabbix_address }}/" ${{ env.MAMONSU_PATH }}/github-actions-tests/sources/agent_3.1.2.conf
54+
run: sed -i "s/\(address *= *\).*/\1 ${{ steps.zabbix_address.outputs.zabbix_address }}/" ${{ env.MAMONSU_PATH }}/github-actions-tests/sources/agent_3.2.0.conf
5555

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

Diff for: .github/workflows/mamonsu-tests-master.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
echo "::set-output name=zabbix_address::$(hostname -I | awk '{print $1}')"
5656
id: zabbix_address
5757
- name: Edit Zabbix address in agent.conf
58-
run: sed -i "s/\(address *= *\).*/\1 ${{ steps.zabbix_address.outputs.zabbix_address }}/" ${{ env.MAMONSU_PATH }}/github-actions-tests/sources/agent_3.1.2.conf
58+
run: sed -i "s/\(address *= *\).*/\1 ${{ steps.zabbix_address.outputs.zabbix_address }}/" ${{ env.MAMONSU_PATH }}/github-actions-tests/sources/agent_3.2.0.conf
5959

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

Diff for: github-actions-tests/mamonsu_build.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ if [ "${OS%:*}" = "centos" ]; then
4545
chmod -R 777 /var/log/mamonsu/
4646
sudo mkdir -p /etc/mamonsu
4747
sudo touch /etc/mamonsu/agent.conf
48-
cat /mamonsu/github-actions-tests/sources/agent_3.1.2.conf > /etc/mamonsu/agent.conf
48+
cat /mamonsu/github-actions-tests/sources/agent_3.2.0.conf > /etc/mamonsu/agent.conf
4949
chmod -R 777 /etc/mamonsu/
5050
sudo yum -y install ./mamonsu*.rpm
5151
systemctl daemon-reload
@@ -74,7 +74,7 @@ elif [ "${OS%:*}" = "ubuntu" ]; then
7474
chmod -R 777 /var/log/mamonsu/
7575
sudo mkdir -p /etc/mamonsu
7676
sudo touch /etc/mamonsu/agent.conf
77-
cat /mamonsu/github-actions-tests/sources/agent_3.1.2.conf > /etc/mamonsu/agent.conf
77+
cat /mamonsu/github-actions-tests/sources/agent_3.2.0.conf > /etc/mamonsu/agent.conf
7878
chmod -R 777 /etc/mamonsu/
7979
sudo apt-get -y install ./mamonsu*.deb
8080
service mamonsu restart

Diff for: mamonsu/__init__.py

+1-1
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.1.2'
4+
__version__ = '3.2.0'
55
__licence__ = 'BSD'
66

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

Diff for: mamonsu/plugins/pgsql/health.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ def items(self, template, dashboard=False):
4141
}) + template.item({
4242
'name': 'PostgreSQL: cache hit ratio',
4343
'key': self.right_type(self.key_cache, "hit"),
44-
'value_type': value_type,
44+
'value_type': Plugin.VALUE_TYPE.numeric_float,
4545
'units': Plugin.UNITS.percent,
4646
'type': Plugin.TYPE.CALCULATED,
47-
'params': "last(//pgsql.blocks[hit])*100/(last(//pgsql.blocks[hit])+last(//pgsql.blocks[read]))"
47+
'params': "last(pgsql.blocks[hit])*100/(last(pgsql.blocks[hit])+last(pgsql.blocks[read]))"
4848
}) + template.item({
4949
'name': 'PostgreSQL: service uptime',
5050
'key': self.right_type(self.key_uptime),

Diff for: mamonsu/plugins/pgsql/plugin.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -40,22 +40,22 @@ def extension_schema(self, extension, db=None):
4040
def disable_and_exit_if_extension_is_not_installed(self, ext, db=None):
4141
if not self.extension_installed(ext, db=db, silent=True):
4242
self.disable()
43-
raise PluginDisableException("""Disable plugin and exit, because '{0}'
43+
raise PluginDisableException("""Disable plugin and exit, because '{0}' \
4444
extension is not installed. Enable it in PostgreSQL instance: '{1}',
4545
if needed and restart.""".format(ext, Pooler.connection_string(db)))
4646

4747
def disable_and_exit_if_not_pgpro_ee(self, db=None):
4848
if not Pooler.is_pgpro_ee(db):
4949
self.disable()
50-
raise PluginDisableException("""Disable plugin and exit, because
50+
raise PluginDisableException("""Disable plugin and exit, because \
5151
PostgresPro Enterprise Edition is not detected [instance: '{0}']
5252
""".format(Pooler.connection_string(db)))
5353

5454
def disable_and_exit_if_archive_mode_is_not_on(self, db=None):
5555
param = Pooler.get_sys_param('archive_mode', db=db)
5656
if param != 'on' and param != 'always':
5757
self.disable()
58-
raise PluginDisableException("""Disable plugin and exit, because '{0}'
59-
parameter is neither 'on' nor 'always'. Enable it "{1}" or "{2}" in PostgreSQL instance,
58+
raise PluginDisableException("""Disable plugin and exit, because '{0}' \
59+
parameter is neither 'on' nor 'always'. Enable it "{1}" or "{2}" in PostgreSQL instance, \
6060
if needed and restart.""".format('archive_mode', 'alter system set archive_mode = on;',
6161
'alter system set archive_mode = always;'))

Diff for: mamonsu/plugins/pgsql/xlog.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ def items(self, template, dashboard=False):
182182
'value_type': Plugin.VALUE_TYPE.numeric_float,
183183
'units': Plugin.UNITS.percent,
184184
'type': Plugin.TYPE.CALCULATED,
185-
'params': "last(//" + self.key_wal_sync_time + ")/10/" + self.plugin_config('interval')
185+
'params': "last(" + self.key_wal_sync_time + ")/10/" + self.plugin_config('interval')
186186
})
187187
if not dashboard:
188188
return result

Diff for: packaging/debian/changelog

+7
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
mamonsu (3.2.0-1) stable; urgency=low
2+
* added new Invalid Indexes metric and trigger to Databases discovery rule;
3+
* added version number output to log;
4+
* fixed template syntax;
5+
* fixed Archive plugin to fit PostgreSQL 10 or lower;
6+
* fixed Cache Hit Ratio and Sync Duty Zabbix item formula;
7+
18
mamonsu (3.1.2-1) stable; urgency=low
29
* fixed Files Need To Archivee and Size Of Files Need To Archive evaluation;
310

Diff for: packaging/rpm/SPECS/mamonsu.spec

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Name: mamonsu
2-
Version: 3.1.2
2+
Version: 3.2.0
33
Release: 1%{?dist}
44
Summary: Monitoring agent for PostgreSQL
55
Group: Applications/Internet
@@ -70,6 +70,13 @@ chown mamonsu.mamonsu /var/log/mamonsu
7070
/sbin/chkconfig --del mamonsu
7171

7272
%changelog
73+
* Fri Nov 26 2021 Alexandra Kuznetsova <[email protected]> - 3.2.0-1
74+
- added new Invalid Indexes metric and trigger to Databases discovery rule;
75+
- added version number output to log;
76+
- fixed template syntax;
77+
- fixed Archive plugin to fit PostgreSQL 10 or lower;
78+
- fixed Cache Hit Ratio and Sync Duty Zabbix item formula;
79+
7380
* Mon Nov 8 2021 Alexandra Kuznetsova <[email protected]> - 3.1.2-1
7481
- fixed Files Need To Archivee and Size Of Files Need To Archive evaluation;
7582

Diff for: packaging/win/mamonsu.def.nsh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
!define NAME Mamonsu
2-
!define VERSION 3.1.2
2+
!define VERSION 3.2.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)