This commit is contained in:
Blackwhitebear8 2025-06-22 16:33:28 +02:00
commit 5e31dd0214
37 changed files with 2082 additions and 0 deletions

17
modules/akvorado.py Normal file
View file

@ -0,0 +1,17 @@
import os
import requests
from dotenv import load_dotenv
load_dotenv()
BASE_URL = os.getenv("AKVORADO_BASE_URL", "http://localhost:8081/api/v0/console/widget")
def get_widget_data(endpoint: str):
url = f"{BASE_URL}/{endpoint}?0"
try:
res = requests.get(url)
res.raise_for_status()
return res.json()
except requests.RequestException as e:
print(f"Fout bij ophalen van {endpoint}: {e}")
return {"top": []}