updated zabbix state
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Paul 2025-06-10 22:01:14 +02:00
parent 39dbd4e073
commit a8a3f1622b

View File

@ -8,14 +8,14 @@ import dateutil.parser
def discovery(url="http://localhost:8898"): def discovery(url="http://localhost:8898"):
ret = {"data": []} ret = {"data": []}
req = urlopen(url=f"{url}/v1/jobs")
try: try:
req = urlopen(url=f"{url}/v1/jobs")
for res_value in json.loads(req.read()): for res_value in json.loads(req.read()):
if not res_value["disabled"]: if not res_value["disabled"]:
ret["data"].append({"{#SERVICE}": res_value["name"]}) ret["data"].append({"{#SERVICE}": res_value["name"]})
return json.dumps(ret)
except Exception as err: except Exception as err:
return f"error: {err}" return f"error: {err}"
return json.dumps(ret)
def status(url="http://localhost:8898", task_name=""): def status(url="http://localhost:8898", task_name=""):
ret = "" ret = ""