diff --git a/.gitignore b/.gitignore
index 0f899fb..ad35274 100644
--- a/.gitignore
+++ b/.gitignore
@@ -330,3 +330,5 @@ ASALocalRun/
# MFractors (Xamarin productivity tool) working folder
.mfractor/
+/SecurityService/appsettings.development.json
+/SecurityService/appsettings.development.json
diff --git a/Directory.Packages.props b/Directory.Packages.props
index 84e750f..f224dcc 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -4,54 +4,54 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
+
-
+
-
-
+
+
-
-
-
+
+
+
-
+
-
-
+
+
-
+
\ No newline at end of file
diff --git a/SecurityService/Program.cs b/SecurityService/Program.cs
index f4ac6db..e05cfa2 100644
--- a/SecurityService/Program.cs
+++ b/SecurityService/Program.cs
@@ -32,6 +32,7 @@
using Shared.Serialisation;
using System.Reflection;
using System.Security.Cryptography;
+using Shared.Monitoring;
using static OpenIddict.Abstractions.OpenIddictConstants;
using static OpenIddict.Abstractions.OpenIddictConstants.Permissions;
using ILogger = Microsoft.Extensions.Logging.ILogger;
@@ -229,7 +230,7 @@
else {
builder.Services.AddHealthChecks().AddMessagingService().AddCheck("database").AddCheck("issuer");
}
-
+builder.Services.AddUptimeKuma();
builder.Services.AddHttpLogging(loggingOptions =>
{
@@ -346,4 +347,11 @@
app.MapHealthChecks("health", new HealthCheckOptions { Predicate = _ => true, ResponseWriter = Shared.HealthChecks.HealthCheckMiddleware.WriteResponse });
app.MapHealthChecks("healthui", new HealthCheckOptions { Predicate = _ => true, ResponseWriter = UIResponseWriter.WriteHealthCheckUIResponse });
+app.Lifetime.ApplicationStarted.Register(() =>
+{
+ app.RegisterWithUptimeKumaAsync()
+ .GetAwaiter()
+ .GetResult();
+});
+
app.Run();
diff --git a/SecurityService/SecurityService.csproj b/SecurityService/SecurityService.csproj
index 44c9933..369adc2 100644
--- a/SecurityService/SecurityService.csproj
+++ b/SecurityService/SecurityService.csproj
@@ -43,6 +43,9 @@
+
+ Always
+
Always
diff --git a/SecurityService/appsettings.json b/SecurityService/appsettings.json
index 201acb8..9d82700 100644
--- a/SecurityService/appsettings.json
+++ b/SecurityService/appsettings.json
@@ -35,5 +35,13 @@
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
+ },
+ "UptimeKuma": {
+ "Monitor": {
+ "Name": "Security Service",
+ "Url": "https://localhost:5001/health",
+ "IntervalInSeconds": 60,
+ "IgnoreTls": true
+ }
}
}