Skip to content

Commit d77c04c

Browse files
committed
Replace pyzabbix with zabbix_utils
pyzabbix is not tested on latest Zabbix LTS (7.0)
1 parent 4be5d7c commit d77c04c

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ RUN apt-get update \
4848
libvirt-python \
4949
mock \
5050
mysqlclient \
51-
pyzabbix \
5251
sqlalchemy==1.3.23 \
5352
treq \
5453
twisted==22.10.0 \
54+
zabbix-utils \
5555
&& if [ "$master_type" = "master-web" ]; then \
5656
pip install --no-cache-dir pyjade; \
5757
fi \

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ libvirt-python
1010
pylint
1111
pylint-django
1212
python-dotenv
13-
pyzabbix
1413
sqlalchemy==1.3.23
1514
treq
15+
zabbix-utils

utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
from datetime import datetime, timedelta
66

77
import docker
8-
from pyzabbix import ZabbixAPI
98
from twisted.internet import defer
9+
from zabbix_utils import ZabbixAPI
1010

1111
from buildbot.plugins import steps, util, worker
1212
from buildbot.process.properties import Properties, Property
@@ -615,13 +615,13 @@ def prioritizeBuilders(buildmaster, builders):
615615
##### Zabbix helper
616616
def getMetric(hostname, metric):
617617
# set API
618-
zapi = ZabbixAPI(private_config["private"]["zabbix_server"])
618+
zapi = ZabbixAPI(url=private_config["private"]["zabbix_server"])
619619

620620
zapi.session.verify = True
621621

622622
zapi.timeout = 10
623623

624-
zapi.login(api_token=private_config["private"]["zabbix_token"])
624+
zapi.login(token=private_config["private"]["zabbix_token"])
625625

626626
host_id = None
627627
for h in zapi.host.get(output="extend"):

0 commit comments

Comments
 (0)