diff --git a/Directory.Packages.props b/Directory.Packages.props
index 35c4dc2..180e9a8 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -3,20 +3,20 @@
true
-
-
-
+
+
+
-
-
-
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
\ No newline at end of file
diff --git a/MobileConfiguration/Program.cs b/MobileConfiguration/Program.cs
index dbd06c9..7449018 100644
--- a/MobileConfiguration/Program.cs
+++ b/MobileConfiguration/Program.cs
@@ -14,6 +14,7 @@
using System.ComponentModel;
using System.Reflection;
using System.Text.Json;
+using Shared.Monitoring;
using ILogger = Microsoft.Extensions.Logging.ILogger;
using LogLevel = Microsoft.Extensions.Logging.LogLevel;
@@ -138,6 +139,8 @@
builder.Services.ConfigureHttpJsonOptions(options => {
JsonSerializerConfiguration.ConfigureMinimalApi(options.SerializerOptions);
});
+builder.Services.AddUptimeKuma();
+
var app = builder.Build();
var serialiser = app.Services.GetRequiredService();
@@ -165,6 +168,13 @@
InitializeDatabase(app).Wait(CancellationToken.None);
+app.Lifetime.ApplicationStarted.Register(() =>
+{
+ app.RegisterWithUptimeKumaAsync()
+ .GetAwaiter()
+ .GetResult();
+});
+
app.Run();
diff --git a/MobileConfiguration/appsettings.json b/MobileConfiguration/appsettings.json
index 6abeec4..f52f840 100644
--- a/MobileConfiguration/appsettings.json
+++ b/MobileConfiguration/appsettings.json
@@ -5,5 +5,12 @@
},
"ConnectionStrings": {
"ConfigurationDatabase": "server=192.168.1.163;user id=sa;password=Sc0tland;database=ConfigurationHost;Encrypt=false"
+ },
+ "UptimeKuma": {
+ "Monitor": {
+ "Name": "Mobile Configuration",
+ "Url": "http://localhost:9200/health",
+ "IntervalInSeconds": 60
+ }
}
}