Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace pyzabbix with zabbix_utils #618

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ libvirt-python
pylint
pylint-django
python-dotenv
pyzabbix
sqlalchemy==1.3.23
treq
zabbix-utils
6 changes: 3 additions & 3 deletions utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"):
Expand Down
Loading