make refresh interval configurable
This commit is contained in:
parent
85094987ab
commit
5d58fdc6f0
2 changed files with 7 additions and 1 deletions
|
@ -114,5 +114,11 @@
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"default": "https://icinga2/api/v1/objects/services?filter=service.state!=ServiceOK",
|
"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!"
|
"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
|
||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
|
|
2
service
2
service
|
@ -167,7 +167,7 @@ def main():
|
||||||
except Exception:
|
except Exception:
|
||||||
traceback.print_exc()
|
traceback.print_exc()
|
||||||
|
|
||||||
time.sleep(20)
|
time.sleep(CONFIG["refresh_interval"])
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|
Loading…
Reference in a new issue