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 @@ -18,6 +18,7 @@
<PackageVersion Include="EventStoreProjections" Version="2023.12.3" />
<PackageVersion Include="FileProcessor.File.DomainEvents" Version="2026.9.2.153" />
<PackageVersion Include="FileProcessor.FileImportLog.DomainEvents" Version="2026.9.2.153" />
<PackageVersion Include="HealthMonitoring.Client" Version="2026.9.2.30" />
Comment thread
StuartFerguson marked this conversation as resolved.
Resolved
<PackageVersion Include="Lamar" Version="16.0.0" />
<PackageVersion Include="Lamar.Microsoft.DependencyInjection" Version="16.0.0" />
<PackageVersion Include="MediatR" Version="14.2.0" />
Expand Down
1 change: 1 addition & 0 deletions NuGet.Config
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<package pattern="ClientProxyBase" />
<package pattern="EventStoreProjections" />
<package pattern="FileProcessor.*" />
<package pattern="HealthMonitoring.*" />
<package pattern="MessagingService.*" />
<package pattern="SecurityService.*" />
<package pattern="Shared" />
Expand Down
4 changes: 3 additions & 1 deletion TransactionProcessor/Bootstrapper/MiddlewareRegistry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ namespace TransactionProcessor.Bootstrapper
using Common;
using EventStore.Client;
using Google.Api;
using HealthMonitoring.Client;
using Lamar;
using Microsoft.AspNetCore.Authentication.JwtBearer;
using Microsoft.AspNetCore.Http.Json;
Expand Down Expand Up @@ -55,7 +56,8 @@ public MiddlewareRegistry()
this.ConfigureMvc();
this.ConfigureAuthorization();
this.ConfigureJsonOptions();
this.AddUptimeKuma();

this.AddHealthMonitoringRegistration(Startup.Configuration);
}

#endregion
Expand Down
7 changes: 6 additions & 1 deletion TransactionProcessor/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ namespace TransactionProcessor
using NLog;
using Sentry.Extensibility;
using Shared.General;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Reflection;
Expand Down Expand Up @@ -79,7 +80,11 @@ private static void ConfigureWebHost(IHostBuilder hostBuilder) {
.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"
});

// Build a snapshot of configuration so we can use it immediately (e.g. for Sentry)
IConfigurationRoot builtConfig = configBuilder.Build();
Expand Down
9 changes: 1 addition & 8 deletions TransactionProcessor/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -122,14 +122,7 @@ public void Configure(IApplicationBuilder app,
this.ConfigureEndpoints(app);

app.PreWarm();

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


this.TraceLoadedTokenAssemblies();
}

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

<ItemGroup>
<PackageReference Include="HealthMonitoring.Client" />
<PackageReference Include="NuGet.Packaging" />
<PackageReference Include="NuGet.Protocol" />
<PackageReference Include="OpenIddict.Validation.AspNetCore" />
Expand Down
22 changes: 17 additions & 5 deletions TransactionProcessor/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -190,12 +190,24 @@
]
}
},
"UptimeKuma": {
"Monitor": {
"HealthMonitoring": {
"Service": {
"ServiceId": "transaction-processor",
"Name": "Transaction Processor",
"Url": "http://localhost:5002/health",
"IntervalInSeconds": 60
}
"Description": "Transaction Processor",
"HealthUrl": "http://localhost:5002/healthui",
"IgnoreCertificateErrors": true
},
"Dependencies": [
{
"DependencyName": "Security Service",
"TargetServiceId": "security-service"
},
{
"DependencyName": "Eventstore",
"TargetServiceId": "kurrentdb"
}
]
},
"ConnectionStrings": {
"TransactionProcessorReadModel": "server=192.168.1.163;user id=sa;password=Sc0tland;database=TransactionProcessorReadModel;Encrypt=false"
Expand Down
Loading