Orneholm.ApplicationInsights.HealthChecks
0.1.0
See the version list below for details.
dotnet add package Orneholm.ApplicationInsights.HealthChecks --version 0.1.0
NuGet\Install-Package Orneholm.ApplicationInsights.HealthChecks -Version 0.1.0
<PackageReference Include="Orneholm.ApplicationInsights.HealthChecks" Version="0.1.0" />
paket add Orneholm.ApplicationInsights.HealthChecks --version 0.1.0
#r "nuget: Orneholm.ApplicationInsights.HealthChecks, 0.1.0"
// Install Orneholm.ApplicationInsights.HealthChecks as a Cake Addin
#addin nuget:?package=Orneholm.ApplicationInsights.HealthChecks&version=0.1.0
// Install Orneholm.ApplicationInsights.HealthChecks as a Cake Tool
#tool nuget:?package=Orneholm.ApplicationInsights.HealthChecks&version=0.1.0
Orneholm - Application Insights - Health Checks
ASP.NET Core Health check publisher for Azure Application Insights that will publish the health check reports as availibility telemetry, including details and data. As described in the Microsoft Docs custom availibility telemetry does not show up in all dashboards, but you can easily trigger alerts on them and show data by custom Log Analytics queries.
Install
Orneholm.ApplicationInsights.HealthChecks is distributed as package on NuGet, install using the tool of your choice, for example dotnet cli:
dotnet add package Orneholm.ApplicationInsights.HealthChecks
Getting started
To get started, configure your ASP.NET Core 2.2 app to use Application Insights:
public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
WebHost.CreateDefaultBuilder(args)
.UseApplicationInsights()
.UseStartup<Startup>();
Then, in your Startup.cs
, where you register your services, add the Application Insights Availability Publisher:
services.AddHealthChecks()
.AddCheck("SampleCheck1", () => HealthCheckResult.Healthy())
.AddCheck("SampleCheck2", () => HealthCheckResult.Degraded())
.AddCheck("SampleCheck3", () => HealthCheckResult.Unhealthy())
.AddApplicationInsightsAggregatedAvailabilityPublisher()
.AddApplicationInsightsAvailabilityPublisher();
.AddApplicationInsightsAggregatedAvailabilityPublisher()
: Aggregate all health check reports into one availability telemetry and send it to Application Insights. Only contains general details and details on status, duration and description for each health check..AddApplicationInsightsAvailabilityPublisher()
: This will publish each health check report as individual availability telemetry and send it to Application Insights. Contains more details such as data returned from each check.
Both of them can be used side by side, to get one item for the general health of the system and then multiple ones with more details.
Customization
You can customize some options, by using an overload:
.AddApplicationInsightsAggregatedAvailabilityPublisher(options =>
{
options.TestName = "AspNetHealthChecks";
options.TestRunLocation = "Application";
options.TreatDegradedAsSuccess = false;
})
.AddApplicationInsightsAvailabilityPublisher(options =>
{
options.TestNamePrefix = "AspNetHealthCheck";
options.TestRunLocation = "Application";
options.TreatDegradedAsSuccess = false;
});
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Microsoft.ApplicationInsights (>= 2.8.1)
- Microsoft.Extensions.Diagnostics.HealthChecks (>= 2.2.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.0.0 | 53,816 | 1/17/2020 |
1.0.0-beta-1 | 389 | 12/26/2019 |
0.2.0 | 705 | 5/26/2019 |
0.1.0 | 651 | 1/11/2019 |