Skip to content

Commit fd75eb0

Browse files
committed
Merge branch 'dev'
2 parents 97d9bea + 29961c2 commit fd75eb0

File tree

13 files changed

+37
-15
lines changed

13 files changed

+37
-15
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ jobs:
8080
echo "zabbix_address=$(hostname -I | awk '{print $1}')" >> $GITHUB_OUTPUT
8181
id: zabbix_address
8282
- name: Edit Zabbix address in agent.conf
83-
run: sed -i "s/\(address *= *\).*/\1 ${{ steps.zabbix_address.outputs.zabbix_address }}/" ${{ env.MAMONSU_PATH }}/github-actions-tests/sources/agent_3.5.8.conf
83+
run: sed -i "s/\(address *= *\).*/\1 ${{ steps.zabbix_address.outputs.zabbix_address }}/" ${{ env.MAMONSU_PATH }}/github-actions-tests/sources/agent_3.5.9.conf
8484

8585
- name: Copy test scripts to container
8686
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
@@ -91,7 +91,7 @@ jobs:
9191
echo "zabbix_address=$(hostname -I | awk '{print $1}')" >> $GITHUB_OUTPUT
9292
id: zabbix_address
9393
- name: Edit Zabbix address in agent.conf
94-
run: sed -i "s/\(address *= *\).*/\1 ${{ steps.zabbix_address.outputs.zabbix_address }}/" ${{ env.MAMONSU_PATH }}/github-actions-tests/sources/agent_3.5.8.conf
94+
run: sed -i "s/\(address *= *\).*/\1 ${{ steps.zabbix_address.outputs.zabbix_address }}/" ${{ env.MAMONSU_PATH }}/github-actions-tests/sources/agent_3.5.9.conf
9595

9696
- name: Copy test scripts to container
9797
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.5.8.conf > /etc/mamonsu/agent.conf
44+
cat /mamonsu/github-actions-tests/sources/agent_3.5.9.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.5.8.conf > /etc/mamonsu/agent.conf
67+
cat /mamonsu/github-actions-tests/sources/agent_3.5.9.conf > /etc/mamonsu/agent.conf
6868
service mamonsu restart
6969
sleep 5
7070
echo && echo && echo "mamonsu version:"

github-actions-tests/tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ REPO
6969
eval "${PACKAGE_MANAGER_INSTALL} wget"
7070
eval "${PACKAGE_MANAGER_INSTALL} bc"
7171
eval "${PACKAGE_MANAGER_INSTALL} unzip"
72-
eval "${PACKAGE_MANAGER_INSTALL} https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm"
72+
eval "${PACKAGE_MANAGER_INSTALL} https://archives.fedoraproject.org/pub/archive/epel/7/x86_64/Packages/e/epel-release-7-14.noarch.rpm"
7373
REPO=${PACKAGE_MANAGER_INSTALL}" https://download.postgresql.org/pub/repos/yum/reporpms/EL-"$(echo ${OS} | sed -r 's/^[^0-9]*([0-9]+).*/\1/')"-x86_64/pgdg-redhat-repo-latest.noarch.rpm"\
7474

7575
# run tests

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__ = 'info@postgrespro.ru'
33
__description__ = 'Monitoring agent for PostgreSQL'
4-
__version__ = '3.5.8'
4+
__version__ = '3.5.9'
55
__licence__ = 'BSD'
66

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

mamonsu/plugins/pgsql/driver/pg8000/core.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,16 @@
22
from collections import defaultdict, deque
33
from datetime import datetime as Datetime
44
from decimal import Decimal
5-
from pkg_resources import packaging
65
from hashlib import md5
76
from itertools import count, islice
87
from struct import Struct
98
from warnings import warn
109

10+
try:
11+
from pkg_resources import packaging
12+
except ImportError:
13+
import packaging.version
14+
1115
from mamonsu.plugins.pgsql.driver.pg8000 import converters
1216
from .exceptions import (
1317
ArrayContentNotSupportedError, DatabaseError, Error, IntegrityError,

mamonsu/plugins/pgsql/driver/pool.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1-
from pkg_resources import packaging
21
from .connection import Connection, ConnectionInfo
32

3+
try:
4+
from pkg_resources import packaging
5+
except ImportError:
6+
import packaging.version
47

58
class Pool(object):
69
ExcludeDBs = ["template0", "template1"]

mamonsu/plugins/pgsql/memory_leak_diagnostic.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,13 @@
44
import os
55
from .pool import Pooler
66
import re
7-
from pkg_resources import packaging
87
import mamonsu.lib.platform as platform
98
import posix
109

10+
try:
11+
from pkg_resources import packaging
12+
except ImportError:
13+
import packaging.version
1114

1215
class MemoryLeakDiagnostic(Plugin):
1316
DEFAULT_CONFIG = {

mamonsu/plugins/pgsql/replication.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
# -*- coding: utf-8 -*-
22

33
from mamonsu.plugins.pgsql.plugin import PgsqlPlugin as Plugin
4-
from pkg_resources import packaging
54
from .pool import Pooler
65
from mamonsu.lib.zbx_template import ZbxTemplate
76

7+
try:
8+
from pkg_resources import packaging
9+
except ImportError:
10+
import packaging.version
11+
812
NUMBER_NON_ACTIVE_SLOTS = 0
913

1014

0 commit comments

Comments
 (0)