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():
|
||||
if not bool(service.get("host")):
|
||||
continue
|
||||
|
||||
if mon := service.get("monitoring"):
|
||||
|
||||
if service.get("dns"):
|
||||
url = f"https://{service["dns"][0]['domain']}"
|
||||
|
||||
|
@ -72,7 +76,6 @@ class FilterModule(object):
|
|||
|
||||
new_endpoint = {
|
||||
"name": name,
|
||||
"enabled": bool(service.get("host")),
|
||||
"group": mon.get("group"),
|
||||
"url": url,
|
||||
"conditions": conditions,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue