mirror of
https://github.com/outscale/zabbix-super-vision.git
synced 2024-12-21 21:05:21 +01:00
Fix api calls
This commit is contained in:
parent
579ba0370d
commit
209d3fba7e
@ -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
|
||||
|
@ -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()
|
||||
main()
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 138 KiB After Width: | Height: | Size: 226 KiB |
Loading…
Reference in New Issue
Block a user