diff --git a/settings.py b/settings.py index 5015f89..d6eb19b 100644 --- a/settings.py +++ b/settings.py @@ -3,7 +3,7 @@ ZABBIX_URL = 'https://zabbix.internal' # URL of your Zabbix frontend used to cre ZABBIX_LOGIN = 'Admin' # Login used to call Zabbix API ZABBIX_PASS = 'admin' # Password used to call Zabbix API LIMIT = 3000 # Number of alerts to retrieve for all host groups mentioned below -HOSTGROUP = "Zabbix*" # Host groups related to your alerts (e.g: "Zabbix servers","Zabbix proxy","Zabbix Frontend"). You can use a wildcard. +HOSTGROUP = ["Zabbix*"] # Host groups related to your alerts (e.g: "Zabbix servers","Zabbix proxy","Zabbix Frontend"). You can use a wildcard. SEVERITY = 3 # Minimum severity to retrieve TIMEOUT = 20 # API Timeout PORT = 8080 # Listen port for the super-server diff --git a/super-server.py b/super-server.py index 73f8c02..f127140 100644 --- a/super-server.py +++ b/super-server.py @@ -126,7 +126,7 @@ def get_hostgroups(): request['output'] = 'extend' request['search'] = dict() request['search']['name'] = hg - request['searchWildcardsEnabled'] = 1 + request['searchWildcardsEnabled'] = True resp = zabbix_call(request, 'hostgroup') for x in range(len(resp)): groups.append(resp[x]['name']) @@ -164,7 +164,7 @@ def get_problems(ttl_hash = None): req['limit'] = limit req['groupids'] = groupids req['monitored'] = 1 - req['maintenance'] = 0 + req['maintenance'] = False req['active'] = 1 req['min_severity'] = settings.SEVERITY req['output'] = "extend" @@ -325,4 +325,4 @@ def main(): aiohttp.web.run_app(app, port=settings.PORT) if __name__ == '__main__': - main() \ No newline at end of file + main() diff --git a/super-vision-example.png b/super-vision-example.png index 97fbac6..0f5c661 100644 Binary files a/super-vision-example.png and b/super-vision-example.png differ