Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<PackageVersion Include="AspNetCore.HealthChecks.UI.InMemory.Storage" Version="9.0.0" />
<PackageVersion Include="AspNetCore.HealthChecks.Uris" Version="9.0.0" />
<PackageVersion Include="ClientProxyBase" Version="2026.9.4" />
<PackageVersion Include="HealthMonitoring.Client" Version="2026.9.2.30" />
<PackageVersion Include="OpenIddict.Validation.AspNetCore" Version="7.7.0" />
<PackageVersion Include="OpenIddict.Validation.SystemNetHttp" Version="7.7.0" />
<PackageVersion Include="coverlet.collector" Version="10.0.1" />
Expand Down
5 changes: 3 additions & 2 deletions FileProcessor/Bootstrapper/MiddlewareRegistry.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using KurrentDB.Client;
using HealthMonitoring.Client;
using KurrentDB.Client;
using Microsoft.OpenApi;
using Shared.Monitoring;

Expand Down Expand Up @@ -120,7 +121,7 @@ public MiddlewareRegistry()
options.MemoryBufferThreshold = int.MaxValue; // buffer threshold
});

this.AddUptimeKuma();
this.AddHealthMonitoringRegistration(Startup.Configuration);
}

#endregion
Expand Down
1 change: 1 addition & 0 deletions FileProcessor/FileProcessor.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="HealthMonitoring.Client" />
<PackageReference Include="OpenIddict.Validation.AspNetCore" />
<PackageReference Include="OpenIddict.Validation.SystemNetHttp" />
<PackageReference Include="ClientProxyBase" />
Expand Down
6 changes: 5 additions & 1 deletion FileProcessor/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,11 @@ public static IHostBuilder CreateHostBuilder(string[] args)
.AddJsonFile("appsettings.json", optional: true, reloadOnChange: true)
.AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true, reloadOnChange: true)
.AddJsonFile($"/home/txnproc/config/appsettings.local.json", optional: true, reloadOnChange: true)
.AddEnvironmentVariables();
.AddEnvironmentVariables()
.AddInMemoryCollection(new Dictionary<string, string?>
{
["HealthMonitoring:Service:Version"] = Assembly.GetEntryAssembly()?.GetName().Version?.ToString() ?? "0.0.0.0"
Comment thread
StuartFerguson marked this conversation as resolved.
Resolved
});

// Build a snapshot of configuration so we can use it immediately (e.g. for Sentry)
var builtConfig = configBuilder.Build();
Expand Down
8 changes: 0 additions & 8 deletions FileProcessor/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -146,14 +146,6 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerF
app.UseSwagger();

app.UseSwaggerUI();

lifetime.ApplicationStarted.Register(() =>
{
host.RegisterWithUptimeKumaAsync()
.GetAwaiter()
.GetResult();
});

app.PreWarm();
}
}
Expand Down
26 changes: 21 additions & 5 deletions FileProcessor/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,27 @@
},
"TemporaryFileLocation": "/home/txnproc/bulkfiles/temporary"
},
"UptimeKuma": {
"Monitor": {
"HealthMonitoring": {
"Service": {
"ServiceId": "file-processor",
"Name": "File Processor",
"Url": "http://localhost:5009/health",
"IntervalInSeconds": 60
}
"Description": "File Processor",
"HealthUrl": "http://localhost:5009/healthui",
"IgnoreCertificateErrors": true
},
"Dependencies": [
{
"DependencyName": "Security Service",
"TargetServiceId": "security-service"
},
{
"DependencyName": "Transaction Processor Service",
"TargetServiceId": "transaction-processor"
},
{
"DependencyName": "Eventstore",
"TargetServiceId": "kurrentdb"
}
]
}
}
Loading