diff options
| author | crobibero <cody@robibe.ro> | 2020-09-03 09:26:22 -0600 |
|---|---|---|
| committer | crobibero <cody@robibe.ro> | 2020-09-03 09:26:22 -0600 |
| commit | d6594a8a7097c06613b8102dc1fcfb06fc08eacc (patch) | |
| tree | 6527930409a645993970cfa89baf220fbe579a90 /Jellyfin.Server/Startup.cs | |
| parent | 3711a1978e8a400aa28dd75ce8ffb08ac43106e1 (diff) | |
Add db health check
Diffstat (limited to 'Jellyfin.Server/Startup.cs')
| -rw-r--r-- | Jellyfin.Server/Startup.cs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Jellyfin.Server/Startup.cs b/Jellyfin.Server/Startup.cs index 995271aa3..08d59543a 100644 --- a/Jellyfin.Server/Startup.cs +++ b/Jellyfin.Server/Startup.cs @@ -1,11 +1,12 @@ using System; using System.ComponentModel; +using System.Data.OleDb; using System.Net.Http.Headers; using Jellyfin.Api.TypeConverters; using Jellyfin.Server.Extensions; +using Jellyfin.Server.HealthChecks; using Jellyfin.Server.Middleware; using Jellyfin.Server.Models; -using MediaBrowser.Common; using MediaBrowser.Common.Net; using MediaBrowser.Controller; using MediaBrowser.Controller.Configuration; @@ -77,6 +78,9 @@ namespace Jellyfin.Server c.DefaultRequestHeaders.UserAgent.Add(new ProductInfoHeaderValue($"({_serverApplicationHost.ApplicationUserAgentAddress})")); }) .ConfigurePrimaryHttpMessageHandler(x => new DefaultHttpClientHandler()); + + services.AddHealthChecks() + .AddCheck<JellyfinDbHealthCheck>("JellyfinDb"); } /// <summary> @@ -132,6 +136,8 @@ namespace Jellyfin.Server { endpoints.MapMetrics(_serverConfigurationManager.Configuration.BaseUrl.TrimStart('/') + "/metrics"); } + + endpoints.MapHealthChecks(_serverConfigurationManager.Configuration.BaseUrl.TrimStart('/') + "/health"); }); // Add type descriptor for legacy datetime parsing. |
