make refresh interval configurable

This commit is contained in:
Franziska Kunsmann 2023-07-06 11:28:49 +02:00
parent 85094987ab
commit 5d58fdc6f0
2 changed files with 7 additions and 1 deletions

View File

@ -114,5 +114,11 @@
"type": "string",
"default": "https://icinga2/api/v1/objects/services?filter=service.state!=ServiceOK",
"hint": "Full URL to the API endpoint which returns a list of monitored services. Keeping the filter is strongly recommended!"
}, {
"title": "Refresh Interval",
"ui_width": 4,
"name": "refresh_interval",
"type": "integer",
"default": 20
}]
}

View File

@ -167,7 +167,7 @@ def main():
except Exception:
traceback.print_exc()
time.sleep(20)
time.sleep(CONFIG["refresh_interval"])
if __name__ == "__main__":