diff --git a/Directory.Packages.props b/Directory.Packages.props
index 3260542b..35ff8501 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -6,41 +6,41 @@
-
+
-
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
+
-
-
-
-
-
-
+
+
+
+
+
+
-
-
+
+
-
+
\ No newline at end of file
diff --git a/EstateManagementUI.BlazorServer/Program.cs b/EstateManagementUI.BlazorServer/Program.cs
index 0ed37d99..2c568b66 100644
--- a/EstateManagementUI.BlazorServer/Program.cs
+++ b/EstateManagementUI.BlazorServer/Program.cs
@@ -12,6 +12,7 @@
using System.Reflection;
using Microsoft.AspNetCore.DataProtection;
using Microsoft.AspNetCore.Components.Server;
+using Shared.Monitoring;
WebApplicationBuilder builder = WebApplication.CreateBuilder(args).LoadConfiguration().ConfigureKestrel();
@@ -95,6 +96,8 @@
builder.RegisterUIServices().RegisterSerialiser();
+builder.Services.AddUptimeKuma();
+
// Add Health Checks - read URLs from configuration
var estateReportingApiUrl = builder.Configuration.GetValue("AppSettings:EstateReportingApi") ?? "http://localhost:5011";
@@ -185,6 +188,13 @@ Uri ValidateAndCreateUri(string url, string configKey)
ResponseWriter = UIResponseWriter.WriteHealthCheckUIResponse
});
+app.Lifetime.ApplicationStarted.Register(() =>
+{
+ app.RegisterWithUptimeKumaAsync()
+ .GetAwaiter()
+ .GetResult();
+});
+
app.Run();
diff --git a/EstateManagementUI.BlazorServer/appsettings.json b/EstateManagementUI.BlazorServer/appsettings.json
index b646592b..60c74755 100644
--- a/EstateManagementUI.BlazorServer/appsettings.json
+++ b/EstateManagementUI.BlazorServer/appsettings.json
@@ -32,5 +32,12 @@
"fileProcessor",
"transactionProcessor"
]
+ },
+ "UptimeKuma": {
+ "Monitor": {
+ "Name": "Estate Management UI",
+ "Url": "http://localhost:5004/health",
+ "IntervalInSeconds": 60
+ }
}
}