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