Skip to content
This repository was archived by the owner on Nov 17, 2023. It is now read-only.

Commit d5adb5f

Browse files
committed
Update HealthChecks UI libraries to properly handle missing services.
1 parent 5c2b145 commit d5adb5f

File tree

5 files changed

+96
-81
lines changed

5 files changed

+96
-81
lines changed

docker-compose.override.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ services:
324324

325325
webstatus:
326326
environment:
327-
- ASPNETCORE_ENVIRONMENT=Development
327+
- ASPNETCORE_ENVIRONMENT=Production
328328
- ASPNETCORE_URLS=http://0.0.0.0:80
329329
- HealthChecks-UI__HealthChecks__1__Name=WebMVC HTTP Check
330330
- HealthChecks-UI__HealthChecks__1__Uri=http://webmvc/hc

src/Web/WebStatus/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ namespace WebStatus
1212
{
1313
public class Program
1414
{
15-
public static readonly string AppName = Namespace;
1615
public static readonly string Namespace = typeof(Program).Namespace;
16+
public static readonly string AppName = Namespace;
1717

1818
public static int Main(string[] args)
1919
{

src/Web/WebStatus/WebStatus.csproj

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
<None Remove="Views\**" />
1212
</ItemGroup>
1313
<ItemGroup>
14-
<PackageReference Include="AspNetCore.HealthChecks.UI" Version="2.2.19" />
15-
<PackageReference Include="AspNetCore.HealthChecks.UI.Client" Version="2.2.2" />
14+
<PackageReference Include="AspNetCore.HealthChecks.UI" Version="2.2.22" />
15+
<PackageReference Include="AspNetCore.HealthChecks.UI.Client" Version="2.2.3" />
1616
<PackageReference Include="AspNetCore.HealthChecks.Uris" Version="2.2.2" />
1717
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.2.1" />
1818
<PackageReference Include="Microsoft.ApplicationInsights.DependencyCollector" Version="2.6.1" />
@@ -29,5 +29,13 @@
2929
<PackageReference Include="Serilog.Sinks.Console" Version="3.1.1" />
3030
<PackageReference Include="Serilog.Sinks.Seq" Version="4.0.0" />
3131
</ItemGroup>
32+
<ItemGroup>
33+
<Content Update="appsettings.Development.json">
34+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
35+
</Content>
36+
<Content Update="appsettings.json">
37+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
38+
</Content>
39+
</ItemGroup>
3240

3341
</Project>
Lines changed: 83 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,87 @@
11
{
2-
"Logging": {
3-
"IncludeScopes": false,
4-
"LogLevel": {
5-
"Default": "Debug",
6-
"System": "Information",
7-
"Microsoft": "Information"
2+
"HealthChecks-UI": {
3+
"HealthChecks": [
4+
{
5+
"Name": "Ordering HTTP Check",
6+
"Uri": "http://localhost:5102/hc"
7+
},
8+
{
9+
"Name": "Ordering HTTP Background Check",
10+
"Uri": "http://localhost:5111/hc"
11+
},
12+
{
13+
"Name": "Basket HTTP Check",
14+
"Uri": "http://localhost:5103/hc"
15+
},
16+
{
17+
"Name": "Catalog HTTP Check",
18+
"Uri": "http://localhost:5101/hc"
19+
},
20+
{
21+
"Name": "Identity HTTP Check",
22+
"Uri": "http://localhost:5105/hc"
23+
},
24+
{
25+
"Name": "Marketing HTTP Check",
26+
"Uri": "http://localhost:5110/hc"
27+
},
28+
{
29+
"Name": "Locations HTTP Check",
30+
"Uri": "http://localhost:5109/hc"
31+
},
32+
{
33+
"Name": "Payments HTTP Check",
34+
"Uri": "http://localhost:5108/hc"
35+
},
36+
{
37+
"Name": "WebMVC HTTP Check",
38+
"Uri": "http://localhost:5100/hc"
39+
},
40+
{
41+
"Name": "WebSPA HTTP Check",
42+
"Uri": "http://localhost:5104/hc"
43+
},
44+
{
45+
"Name": "SignalR HTTP Check",
46+
"Uri": "http://localhost:5112/hc"
47+
},
48+
{
49+
"Name": "Mobile Shopping API GW HTTP Check",
50+
"Uri": "http://localhost:5200/hc"
51+
},
52+
{
53+
"Name": "Mobile Marketing API GW HTTP Check",
54+
"Uri": "http://localhost:5201/hc"
55+
},
56+
{
57+
"Name": "Web Shopping API GW HTTP Check",
58+
"Uri": "http://localhost:5202/hc"
59+
},
60+
{
61+
"Name": "Web Marketing API GW HTTP Check",
62+
"Uri": "http://localhost:5203/hc"
63+
},
64+
{
65+
"Name": "Mobile Shopping Aggregator HTTP Check",
66+
"Uri": "http://localhost:5120/hc"
67+
},
68+
{
69+
"Name": "Web Shopping Aggregator HTTP Check",
70+
"Uri": "http://localhost:5121/hc"
71+
}
72+
],
73+
"EvaluationTimeOnSeconds": 10,
74+
"MinimumSecondsBetweenFailureNotifications": 60
75+
},
76+
"Serilog": {
77+
"SeqServerUrl": "http://localhost:5341/",
78+
"MinimumLevel": {
79+
"Default": "Information",
80+
"Override": {
81+
"Microsoft": "Warning",
82+
"Microsoft.eShopOnContainers": "Information",
83+
"System": "Warning"
84+
}
885
}
986
}
1087
}

src/Web/WebStatus/appsettings.json

Lines changed: 1 addition & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,5 @@
11
{
2-
"HealthChecks-UI-commented-out": {
3-
"HealthChecks": [
4-
{
5-
"Name": "Ordering HTTP Check",
6-
"Uri": "http://localhost:5102/hc"
7-
},
8-
{
9-
"Name": "Ordering HTTP Background Check",
10-
"Uri": "http://localhost:5111/hc"
11-
},
12-
{
13-
"Name": "Basket HTTP Check",
14-
"Uri": "http://localhost:5103/hc"
15-
},
16-
{
17-
"Name": "Catalog HTTP Check",
18-
"Uri": "http://localhost:5101/hc"
19-
},
20-
{
21-
"Name": "Identity HTTP Check",
22-
"Uri": "http://localhost:5105/hc"
23-
},
24-
{
25-
"Name": "Marketing HTTP Check",
26-
"Uri": "http://localhost:5110/hc"
27-
},
28-
{
29-
"Name": "Locations HTTP Check",
30-
"Uri": "http://localhost:5109/hc"
31-
},
32-
{
33-
"Name": "Payments HTTP Check",
34-
"Uri": "http://localhost:5108/hc"
35-
},
36-
{
37-
"Name": "WebMVC HTTP Check",
38-
"Uri": "http://localhost:5100/hc"
39-
},
40-
{
41-
"Name": "WebSPA HTTP Check",
42-
"Uri": "http://localhost:5104/hc"
43-
},
44-
{
45-
"Name": "SignalR HTTP Check",
46-
"Uri": "http://localhost:5112/hc"
47-
},
48-
{
49-
"Name": "Mobile Shopping API GW HTTP Check",
50-
"Uri": "http://localhost:5200/hc"
51-
},
52-
{
53-
"Name": "Mobile Marketing API GW HTTP Check",
54-
"Uri": "http://localhost:5201/hc"
55-
},
56-
{
57-
"Name": "Web Shopping API GW HTTP Check",
58-
"Uri": "http://localhost:5202/hc"
59-
},
60-
{
61-
"Name": "Web Marketing API GW HTTP Check",
62-
"Uri": "http://localhost:5203/hc"
63-
},
64-
{
65-
"Name": "Mobile Shopping Aggregator HTTP Check",
66-
"Uri": "http://localhost:5120/hc"
67-
},
68-
{
69-
"Name": "Web Shopping Aggregator HTTP Check",
70-
"Uri": "http://localhost:5121/hc"
71-
}
72-
],
2+
"HealthChecks-UI": {
733
"EvaluationTimeOnSeconds": 10,
744
"MinimumSecondsBetweenFailureNotifications": 60
755
},

0 commit comments

Comments
 (0)