diff --git a/Dockerfile b/Dockerfile index 245d85e1..23ee8d4d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -48,10 +48,10 @@ RUN apt-get update \ libvirt-python \ mock \ mysqlclient \ - pyzabbix \ sqlalchemy==1.3.23 \ treq \ twisted==22.10.0 \ + zabbix-utils \ && if [ "$master_type" = "master-web" ]; then \ pip install --no-cache-dir pyjade; \ fi \ diff --git a/requirements.txt b/requirements.txt index 0df431cd..8837786e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -10,6 +10,6 @@ libvirt-python pylint pylint-django python-dotenv -pyzabbix sqlalchemy==1.3.23 treq +zabbix-utils diff --git a/utils.py b/utils.py index b2e78344..a9d92504 100644 --- a/utils.py +++ b/utils.py @@ -5,8 +5,8 @@ from datetime import datetime, timedelta import docker -from pyzabbix import ZabbixAPI from twisted.internet import defer +from zabbix_utils import ZabbixAPI from buildbot.plugins import steps, util, worker from buildbot.process.properties import Properties, Property @@ -615,13 +615,13 @@ def prioritizeBuilders(buildmaster, builders): ##### Zabbix helper def getMetric(hostname, metric): # set API - zapi = ZabbixAPI(private_config["private"]["zabbix_server"]) + zapi = ZabbixAPI(url=private_config["private"]["zabbix_server"]) zapi.session.verify = True zapi.timeout = 10 - zapi.login(api_token=private_config["private"]["zabbix_token"]) + zapi.login(token=private_config["private"]["zabbix_token"]) host_id = None for h in zapi.host.get(output="extend"):