Reputation: 6729
My .NET Core Elastic beanstalk app is healthy but when i check the logs i see the following:
10.3.12.142 - - [06/Feb/2022:17:54:53 +0000] "GET / HTTP/1.1" 404 0 "-" "ELB-HealthChecker/2.0" "10.3.2.20"
10.3.11.145 - - [06/Feb/2022:17:54:57 +0000] "GET / HTTP/1.1" 404 0 "-" "ELB-HealthChecker/2.0" "10.3.1.114"
10.3.11.145 - - [06/Feb/2022:17:55:07 +0000] "GET /_system/health HTTP/1.1" 200 232 "-" "ELB-HealthChecker/2.0" "-"
10.3.12.142 - - [06/Feb/2022:17:55:07 +0000] "GET /_system/health HTTP/1.1" 200 232 "-" "ELB-HealthChecker/2.0" "-"
10.3.11.145 - - [06/Feb/2022:17:55:07 +0000] "GET / HTTP/1.1" 404 0 "-" "ELB-HealthChecker/2.0" "10.3.1.114"
10.3.11.145 - - [06/Feb/2022:17:55:22 +0000] "GET /_system/health HTTP/1.1" 200 237 "-" "ELB-HealthChecker/2.0" "-"
10.3.12.142 - - [06/Feb/2022:17:55:22 +0000] "GET /_system/health HTTP/1.1" 200 237 "-" "ELB-HealthChecker/2.0" "-"
/_system/health
is the real health endpoint but i don't understand why ELB is hitting /
instead of just /_system/health
which ofcourse result in 404 which is expected from the app.
I have the following terraform config for health check and i don't use .ebextensions
setting {
namespace = "aws:elasticbeanstalk:environment:process:default"
name = "HealthCheckPath"
value = "/_system/health"
}
setting {
namespace = "aws:elasticbeanstalk:application"
name = "Application Healthcheck URL"
value = "/_system/health"
}
Edit 1
After i change the healthcheck path to /health
(thanks @Marcin i notice that ELB-HealthChecker
is still hitting /
10.3.11.145 - - [07/Feb/2022:08:35:08 +0000] "GET /health HTTP/1.1" 200 227 "-" "ELB-HealthChecker/2.0" "-"
10.3.12.142 - - [07/Feb/2022:08:35:08 +0000] "GET /health HTTP/1.1" 200 232 "-" "ELB-HealthChecker/2.0" "-"
10.3.12.142 - - [07/Feb/2022:08:35:13 +0000] "GET / HTTP/1.1" 404 0 "-" "ELB-HealthChecker/2.0" "10.3.2.20"
Upvotes: 1
Views: 1990
Reputation: 238081
/_system/health
is not supported. The valid paths are:
/ (HTTP GET to root path)
/health
HTTPS:443/
HTTPS:443/health
Upvotes: 1