File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ public static void Main(string[] args)
99 {
1010 var host = new WebHostBuilder ( )
1111 . UseKestrel ( )
12+ . UseHealthChecks ( "/hc" )
1213 . UseContentRoot ( Directory . GetCurrentDirectory ( ) )
1314 . UseIISIntegration ( )
1415 . UseStartup < Startup > ( )
Original file line number Diff line number Diff line change @@ -43,7 +43,10 @@ public void ConfigureServices(IServiceCollection services)
4343 {
4444 services . AddHealthChecks ( checks =>
4545 {
46- checks . AddValueTaskCheck ( "HTTP Endpoint" , ( ) => new ValueTask < IHealthCheckResult > ( HealthCheckResult . Healthy ( "Ok" ) ) ) ;
46+ checks . AddUrlCheck ( Configuration [ "CatalogUrl" ] ) ;
47+ checks . AddUrlCheck ( Configuration [ "OrderingUrl" ] ) ;
48+ checks . AddUrlCheck ( Configuration [ "BasketUrl" ] ) ;
49+ checks . AddUrlCheck ( Configuration [ "IdentityUrl" ] ) ;
4750 } ) ;
4851
4952 services . Configure < AppSettings > ( Configuration ) ;
You can’t perform that action at this time.
0 commit comments