From 03341386e5e2d9a877b55512aea15787724051d9 Mon Sep 17 00:00:00 2001 From: Tim Foerster Date: Mon, 17 Oct 2016 18:24:34 +0200 Subject: [PATCH] Provide ability to filter by groups. --- i3pystatus/zabbix.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/i3pystatus/zabbix.py b/i3pystatus/zabbix.py index b47c900..eff024c 100644 --- a/i3pystatus/zabbix.py +++ b/i3pystatus/zabbix.py @@ -21,11 +21,13 @@ class Zabbix(IntervalModule): ("zabbix_user", "Zabbix API User"), ("zabbix_password", "Zabbix users password"), ("interval", "Update interval"), + ("groups", "Provide groupids(e.g ['102', '10'])"), "format" ) required = ("zabbix_server", "zabbix_user", "zabbix_password") interval = 60 + groups = None format = "{default}" def run(self): @@ -36,6 +38,7 @@ class Zabbix(IntervalModule): zapi.login(self.zabbix_user, self.zabbix_password) triggers = zapi.trigger.get(only_true=1, skipDependent=1, + groupids=self.groups, monitored=1, active=1, min_severity=2,