Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit42c3eb5

Browse files
committed
fix: add support for Zabbix API v6.4
1 parent718d958 commit42c3eb5

File tree

3 files changed

+19
-4
lines changed

3 files changed

+19
-4
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ jobs:
3333
-docker_os:'centos:8'
3434
pg_version:'16'
3535
zabbix_version:'6.2.9'
36+
-docker_os:'centos:8'
37+
pg_version:'16'
38+
zabbix_version:'6.4.13'
3639
exclude:
3740
-docker_os:'centos:8'
3841
pg_version:'12'

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,15 @@ jobs:
3333
-docker_os:'centos:8'
3434
pg_version:'16'
3535
zabbix_version:'6.2.9'
36+
-docker_os:'centos:8'
37+
pg_version:'16'
38+
zabbix_version:'6.4.13'
39+
-docker_os:'ubuntu:20.04'
40+
pg_version:'16'
41+
zabbix_version:'6.4.13'
42+
-docker_os:'ubuntu:20.04'
43+
pg_version:'15'
44+
zabbix_version:'6.4.13'
3645
exclude:
3746
# excludes PG 15, 16 on CentOS
3847
-docker_os:'centos:7'

‎mamonsu/tools/zabbix_cli/request.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
fromcollectionsimportOrderedDict
66

77

8+
fromdistutils.versionimportLooseVersion
89
importurllib.requestasurllib2
910

1011

@@ -13,20 +14,22 @@ class Request(object):
1314
def__init__(self,url,user,passwd):
1415
self._url,self._user,self._passwd=url,user,passwd
1516
self._id,self._auth_tocken=0,None
16-
17+
self._api_version=self.post(method='apiinfo.version',params=[])
18+
1719
defset_user(self,user):
1820
self._user=user
19-
21+
2022
defset_passwd(self,passwd):
2123
self._passwd=passwd
22-
24+
2325
def_auth(self):
2426
ifself._auth_tockenisNone:
2527
ifnotself._user:
2628
returnNone
29+
user_field='user'ifLooseVersion(self._api_version)<LooseVersion('6.4')else'username'
2730
self._auth_tocken=self.post(
2831
'user.login',
29-
{'user':self._user,'password':self._passwd})
32+
{user_field:self._user,'password':self._passwd})
3033
returnself._auth_tocken
3134

3235
def_get_id(self):

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp