Remove disabled services from monitoring
This commit is contained in:
parent
86d66fac5a
commit
654b7c18b1
1 changed files with 4 additions and 1 deletions
|
@ -51,7 +51,11 @@ class FilterModule(object):
|
||||||
]
|
]
|
||||||
|
|
||||||
for name, service in services.items():
|
for name, service in services.items():
|
||||||
|
if not bool(service.get("host")):
|
||||||
|
continue
|
||||||
|
|
||||||
if mon := service.get("monitoring"):
|
if mon := service.get("monitoring"):
|
||||||
|
|
||||||
if service.get("dns"):
|
if service.get("dns"):
|
||||||
url = f"https://{service["dns"][0]['domain']}"
|
url = f"https://{service["dns"][0]['domain']}"
|
||||||
|
|
||||||
|
@ -72,7 +76,6 @@ class FilterModule(object):
|
||||||
|
|
||||||
new_endpoint = {
|
new_endpoint = {
|
||||||
"name": name,
|
"name": name,
|
||||||
"enabled": bool(service.get("host")),
|
|
||||||
"group": mon.get("group"),
|
"group": mon.get("group"),
|
||||||
"url": url,
|
"url": url,
|
||||||
"conditions": conditions,
|
"conditions": conditions,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue