From 263e6fd0de41c761375f5d59b648a6a890959b35 Mon Sep 17 00:00:00 2001 From: dizixagi Date: Sun, 22 Sep 2024 17:23:03 +0200 Subject: [PATCH] Add support for suppressed problems - Nagstamon will treat them as acknowledged. Feature introduced in Zabbix 6.2.0 --- Nagstamon/Servers/ZabbixProblemBased.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Nagstamon/Servers/ZabbixProblemBased.py b/Nagstamon/Servers/ZabbixProblemBased.py index 438e4d6e..b0352e77 100644 --- a/Nagstamon/Servers/ZabbixProblemBased.py +++ b/Nagstamon/Servers/ZabbixProblemBased.py @@ -162,7 +162,11 @@ def _get_status(self): #Get all current problems (trigger based), no need to check acknowledged problems if they are filtered out (load reduce) if conf.filter_acknowledged_hosts_services: - problems = self.zlapi.do_request("problem.get", {'recent': False, 'acknowledged': False}) + # old versions doesnt support suppressed problems + if parse_version(self.zbx_version) < parse_version("6.2.0"): + problems = self.zlapi.do_request("problem.get", {'recent': False, 'acknowledged': False}) + else: + problems = self.zlapi.do_request("problem.get", {'recent': False, 'acknowledged': False, 'suppressed': False}) else: problems = self.zlapi.do_request("problem.get", {'recent': False})