From 6212aa6f2751cb50ffc5df858f22514d165dfd60 Mon Sep 17 00:00:00 2001 From: Folzo Date: Sun, 12 Apr 2026 13:42:44 +0200 Subject: [PATCH] fix: Use hardcoded config in Beszel tool - no env vars needed --- docs/TOOL-BESZEL-OPENWEBUI.md | 40 ++++++++++++----------------------- 1 file changed, 14 insertions(+), 26 deletions(-) diff --git a/docs/TOOL-BESZEL-OPENWEBUI.md b/docs/TOOL-BESZEL-OPENWEBUI.md index d9b9ee0..1716b45 100644 --- a/docs/TOOL-BESZEL-OPENWEBUI.md +++ b/docs/TOOL-BESZEL-OPENWEBUI.md @@ -14,23 +14,27 @@ Permet à Effi d'accéder aux métriques système de FolzoCorp, EffiServer et NA ## Configuration -Les variables d'environnement à configurer: -- `BESZEL_URL`: URL du hub Beszel (défaut: http://192.168.1.25:8090) -- `BESZEL_USER`: Nom d'utilisateur Beszel -- `BESZEL_PASSWORD`: Mot de passe Beszel +Pour modifier les paramètres, modifie les variables en haut du code: +- `BESZEL_URL`: URL du hub Beszel +- `BESZEL_USER`: Username admin +- `BESZEL_PASSWORD`: Password admin ## Tool Code ```python -import os import requests +# Configuration - MODIFIER ICI +BESZEL_URL = "http://192.168.1.25:8090" +BESZEL_USER = "admin" +BESZEL_PASSWORD = "ton_password_beszel" + class Tools: def __init__(self): - self.url = os.getenv("BESZEL_URL", "http://192.168.1.25:8090") - self.username = os.getenv("BESZEL_USER", "admin") - self.password = os.getenv("BESZEL_PASSWORD", "") + self.url = BESZEL_URL + self.username = BESZEL_USER + self.password = BESZEL_PASSWORD self.token = None def _login(self): @@ -145,7 +149,6 @@ class Tools: return alerts def get_all_stats(self): - """Get stats from all monitored systems.""" systems = self._get_systems() if not systems: @@ -165,7 +168,6 @@ class Tools: return "\n\n".join(results) def get_system_stats(self, system_name): - """Get stats for a specific system. Options: folzocorp, effiserver, synology-nas""" systems = self._get_systems() if not systems: @@ -191,7 +193,6 @@ class Tools: return f"[ERROR] System '{system_name}' not found. Available: {', '.join(available)}" def check_alerts(self, system_name="all"): - """Check for resource alerts. Use 'all' or specific system name.""" systems = self._get_systems() if not systems: @@ -219,7 +220,6 @@ class Tools: return "\n".join(alerts) def get_gpu_status(self, system_name="folzocorp"): - """Get GPU status for a specific system. Most useful for folzocorp (AMD RX 7800 XT).""" systems = self._get_systems() if not systems: @@ -260,7 +260,6 @@ class Tools: return "\n".join(lines) def can_run_comfyui(self): - """Check if there's enough RAM and VRAM to run ComfyUI.""" stats = self._get_system_stats("folzocorp") if not stats: return "[ERROR] Cannot get FolzoCorp stats" @@ -312,22 +311,11 @@ def can_run_comfyui(): ## Usage Examples ``` -# Stats de tous les systèmes get_all_stats() - -# Stats d'un système spécifique get_system_stats("folzocorp") -get_system_stats("effiserver") -get_system_stats("synology") - -# Vérifier les alertes check_alerts() check_alerts("folzocorp") - -# Status GPU (surtout utile pour FolzoCorp avec RX 7800 XT) get_gpu_status("folzocorp") - -# Vérifier si ComfyUI peut tourner can_run_comfyui() ``` @@ -337,8 +325,8 @@ can_run_comfyui() |--------|-----|-----| | FolzoCorp | `folzocorp` | AMD RX 7800 XT | | EffiServer | `effiserver` | None (Intel J5040) | -| NAS Synology | `synology-nas` | Intel HD Graphics (transcodage) | +| NAS Synology | `synology-nas` | Intel HD Graphics | --- -*Created 12 April 2026* +*Created 12 April 2026 - Updated to use hardcoded config*