diff --git a/Nagstamon/Servers/ZabbixProblemBased.py b/Nagstamon/Servers/ZabbixProblemBased.py index 319dce01c..4cea0fc7a 100644 --- a/Nagstamon/Servers/ZabbixProblemBased.py +++ b/Nagstamon/Servers/ZabbixProblemBased.py @@ -85,6 +85,10 @@ def do_request(self, method, params={}, no_auth=False): return response_json['result'] + def api_version(self, **options): + obj = self.do_request('apiinfo.version', options, no_auth=True) + return obj['result'] + def logged_in(self): if self.zbx_auth is None: return False diff --git a/Nagstamon/thirdparty/zabbix_api.py b/Nagstamon/thirdparty/zabbix_api.py index 16bb94657..582e6391f 100644 --- a/Nagstamon/thirdparty/zabbix_api.py +++ b/Nagstamon/thirdparty/zabbix_api.py @@ -302,8 +302,7 @@ def logged_in(self): return False def api_version(self, **options): - # kicked out check auth to be able to check vesion before being logged in to use the correct username keyword - #self.__checkauth__() + # kicked out check auth to be able to check version before being logged in to use the correct username keyword obj = self.do_request(self.json_obj('apiinfo.version', options, auth=False)) return obj['result']