fix: remover seq do healthcheck
Some checks failed
Some checks failed
This commit is contained in:
parent
346aa86216
commit
1dc1a5b897
@ -54,7 +54,6 @@ namespace QRRapidoApp.Controllers
|
||||
checks = new
|
||||
{
|
||||
mongodb = ExtractCheckResult(healthReport, "mongodb"),
|
||||
seq = ExtractCheckResult(healthReport, "seq"),
|
||||
resources = ExtractCheckResult(healthReport, "resources"),
|
||||
externalServices = ExtractCheckResult(healthReport, "external_services")
|
||||
},
|
||||
@ -117,35 +116,6 @@ namespace QRRapidoApp.Controllers
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Seq logging service health check
|
||||
/// GET /health/seq
|
||||
/// </summary>
|
||||
[HttpGet("seq")]
|
||||
public async Task<IActionResult> GetSeqHealth()
|
||||
{
|
||||
try
|
||||
{
|
||||
var healthReport = await _healthCheckService.CheckHealthAsync(check => check.Name == "seq");
|
||||
var seqCheck = healthReport.Entries.FirstOrDefault(e => e.Key == "seq");
|
||||
|
||||
if (seqCheck.Key == null)
|
||||
{
|
||||
return StatusCode(503, new { status = "unhealthy", error = "Seq health check not found" });
|
||||
}
|
||||
|
||||
var statusCode = seqCheck.Value.Status == HealthStatus.Unhealthy ? 503 : 200;
|
||||
var response = ExtractCheckResult(healthReport, "seq");
|
||||
|
||||
return StatusCode(statusCode, response);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Seq health check failed");
|
||||
return StatusCode(503, new { status = "unhealthy", error = ex.Message });
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// System resources health check
|
||||
/// GET /health/resources
|
||||
|
||||
@ -217,7 +217,6 @@ builder.Services.AddScoped<ExternalServicesHealthCheck>();
|
||||
|
||||
builder.Services.AddHealthChecks()
|
||||
.AddCheck<MongoDbHealthCheck>("mongodb")
|
||||
.AddCheck<SeqHealthCheck>("seq")
|
||||
.AddCheck<ResourceHealthCheck>("resources")
|
||||
.AddCheck<ExternalServicesHealthCheck>("external_services");
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user