Questions tagged [health-check]

A status of a service and any services it depends on. The health check can be used to monitor the service and is usually accessed via a request to a specific route on the server.

What is a health check?

Health checks are a way to know the status of the service we are monitoring.

This status can be affected by several factors:

  1. The internal state of the service
  2. The external services the service uses (such as external APIs, message brokers)
  3. Hardware dependencies (such as storage or network problems)

Identifying what problems exist in real-time can greatly improve the day-to-day management of the service, and can help track down issues that result from it's downgraded performance, as well as provide observability for a wide array of services.

What questions should contain this tag?

  1. Questions about the proper use of health-checks
  2. Questions about specific implementations of health-checks
  3. Questions about real-time monitoring using health-checks
  4. Questions about recommended health check for specific dependencies
421 questions
4
votes
1 answer

Run certain .NET Core health checks depending on tags

I added .NET Core Health Checks to my app. I want to use tags to only run one check if it's a basic check or all checks for a more detailed check. This is what I've got: services.AddHealthChecks() .AddCheck("Check1", () =>…
runnerpaul
  • 5,942
  • 8
  • 49
  • 118
4
votes
1 answer

Fargate service stops because "ELB health check" fails

I'm brand new in the AWS world and I have an issue with my Fargate task: it is always stopped because the health check seems to encounter an issue: Task failed ELB health checks in (target-group…
romainsalles
  • 2,051
  • 14
  • 17
4
votes
2 answers

How can i get my container to go from starting -> healthy

Background: My Docker container has a very long startup time, and it is hard to predict when it is done. And when the health check kicks in, it first may show 'unhealthy' since the startup is sometimes not finished. This may cause a restart or…
Jocce Nilsson
  • 1,658
  • 14
  • 28
4
votes
1 answer

Trigger HealthCheck by code in aspnet core

I am working with microservice (multiple services) and want to have HealthCheck service which I can call and get health of all the running service. I wan't to trigger healthcheck for each of the service. The idea is to get health of each service via…
hbe
  • 43
  • 5
4
votes
1 answer

How to get Azure APIM health check & details

We are using Azure APIM in production. We are developing service detail page where if it is not available, will update the page. So i would like to know how to check health check for APIM? In most of the case, it will be case of 502/503/504 http…
Manish Joisar
  • 1,256
  • 3
  • 23
  • 47
3
votes
1 answer

Set the 'start-interval' of a healthcheck in docker-compose.yml

I am deploying some services using Docker Compose. I want to check that my containers are healthy using healthcheck (see Docker Compose documentation here). Let's consider the following code. It works fine, except when I uncomment the last line: #…
scūriolus
  • 657
  • 2
  • 5
  • 15
3
votes
2 answers

What is the difference between using AddDbContextCheck and AddSqlServer for HealthCheck?

I have this code which can be used to check the database health using C# in NET 6. Version 1: var hcBuilder = builder.Services.AddHealthChecks(); hcBuilder.AddSqlServer(myServicesConnStr); Version 2: builder.Services.AddHealthChecks() …
Steve
  • 2,963
  • 15
  • 61
  • 133
3
votes
1 answer

Dynamically create healthchecks based on all services that have a certain interface

I have a long set of services that check data, and all under the interface "IDataCheck". IDataChecks is an empty interface with one method "runCheckAsync" In a commandline app I do: IEnumerable? services =…
edelwater
  • 2,650
  • 8
  • 39
  • 67
3
votes
1 answer

Docker HEALTHCHECK not working as expected

I have a php project to test healthchecks with three files in it: index.php PHP Test

Hi from container:

health.php …
stoic
  • 4,700
  • 13
  • 58
  • 88
3
votes
0 answers

adding a health check to python fargate instance

I am trying to fix an error in my fargate service, where the elastic load balancer health checks keep failing. I know that the issue is not my infrastructure -- because the same cloudformation template works when I use a web application that…
mjamo
  • 31
  • 3
3
votes
1 answer

PHP application behind application load balancer failing health check

I am trying to deploy a PHP through AWS CodeDeploy and am currently stuck on the AllowTraffic step in CodeDeploy. The application is on an EC2 instance behind an ALB. In the ALB, I am getting failing health checks. I have the PHP application code…
3
votes
3 answers

How to enable health in Spring Boot Actuator

I have to check whether my service / app works or not. I've added dependency org.springframework.boot spring-boot-starter-actuator 2.6.2 and also tried to add…
Programmer
  • 105
  • 2
  • 6
3
votes
1 answer

gRPC HealthCheck reports SERVING even when it is defined as NOT_SERVING

I am trying to create a server with two services and a HealthCheck in each one, so I can check them independently and use reflection to know the methods exposed in each one. I have hardcoded one service as NOT_SERVING to test it, however, for some…
Occam's razor
  • 41
  • 1
  • 4
3
votes
2 answers

Disable Only HealthCheck Related Logging

I'm trying to figure out a way to disable any health-check related ILogger logging. I am aware of LogLevel filtering, but that will not work here. As an example, I have a healthcheck that makes an outbound call to a RabbitMQ metrics API. This…
Nathan A
  • 11,059
  • 4
  • 47
  • 63
3
votes
2 answers

How to use AWS S3 health check method provided by AspNetCore.Diagnostics.HealthChecks library

AWS S3 health check is one of the built-in health check services provided by .NET Core. It is available in AspNetCore.HealthChecks.Aws nuget package and presumably can be used like the following code snippet: public void…
user1451111
  • 1,735
  • 3
  • 18
  • 30
1 2
3
27 28