From 05e5a209dab2c1cb1fb0670533d2d9ed24ce022f Mon Sep 17 00:00:00 2001 From: triggermeelmo Date: Thu, 8 Jan 2026 14:54:26 +0100 Subject: [PATCH] =?UTF-8?q?logs=20eingef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/MonitoringController.cs | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/watcher-monitoring/Controllers/MonitoringController.cs b/watcher-monitoring/Controllers/MonitoringController.cs index 8028c05..768e651 100644 --- a/watcher-monitoring/Controllers/MonitoringController.cs +++ b/watcher-monitoring/Controllers/MonitoringController.cs @@ -72,7 +72,7 @@ public class MonitoringController : Controller try { // Find Server in Database - Server server = await _context.Servers.FindAsync(dto.Id); + var server = await _context.Servers.FindAsync(dto.Id); // Add Hardware Configuration try @@ -83,6 +83,7 @@ public class MonitoringController : Controller server.RamSize = dto.RamSize; // Diskspace fehlt + _logger.LogInformation("Harware configuration successfull for server {server}", server.Name); } catch (Exception ex) { @@ -99,9 +100,24 @@ public class MonitoringController : Controller } // Server-Metrics endpoint for watcher-agent + [HttpPost("server-metrics/{id}")] + public async Task ServerMetrics ([FromBody] HardwareDto dto) + { + return Ok(); + } // Service-Detection endpoint for watcher-agent + [HttpPost("container-detection")] + public async Task ContainerDetection ([FromBody] HardwareDto dto) + { + return Ok(); + } - // Service-Metrics endpoint for watcher-agent + // Container-Metrics endpoint for watcher-agent + [HttpPost("container-metrics/{id}")] + public async Task ContainerMetrics ([FromBody] HardwareDto dto) + { + return Ok(); + } } \ No newline at end of file