NetEvolve.HealthPublishers.Opsgenie
1.10.0
Prefix Reserved
dotnet add package NetEvolve.HealthPublishers.Opsgenie --version 1.10.0
NuGet\Install-Package NetEvolve.HealthPublishers.Opsgenie -Version 1.10.0
<PackageReference Include="NetEvolve.HealthPublishers.Opsgenie" Version="1.10.0" />
<PackageVersion Include="NetEvolve.HealthPublishers.Opsgenie" Version="1.10.0" />
<PackageReference Include="NetEvolve.HealthPublishers.Opsgenie" />
paket add NetEvolve.HealthPublishers.Opsgenie --version 1.10.0
#r "nuget: NetEvolve.HealthPublishers.Opsgenie, 1.10.0"
#:package NetEvolve.HealthPublishers.Opsgenie@1.10.0
#addin nuget:?package=NetEvolve.HealthPublishers.Opsgenie&version=1.10.0
#tool nuget:?package=NetEvolve.HealthPublishers.Opsgenie&version=1.10.0
NetEvolve.HealthPublishers.Opsgenie
An IHealthCheckPublisher implementation that creates and closes Opsgenie alerts based on HealthReport results, using the Alert API (/v2/alerts) directly over HTTP.
Features
- Maps
HealthStatusto alert lifecycle:Degraded/Unhealthycreate or update an alert,Healthycloses it - Maps
HealthStatusto an Opsgenie alert priority (Degraded→P3,Unhealthy→P1) - Derives a stable alert alias from the required
SystemIdentifier, so repeated unhealthy reports update the same alert instead of creating duplicates, and healthy reports close that same alert - Tags and details every alert with the machine name and the
SystemIdentifier, useful to distinguish reports coming from the same machine across multiple applications or instances - Configuration- or builder-based setup, consistent with the
NetEvolve.HealthChecks.*conventions - Named registrations to publish to multiple Opsgenie teams/integrations side by side
- Supports the EU instance (
https://api.eu.opsgenie.com) viaApiUrl - No Opsgenie SDK dependency - just
HttpClientviaIHttpClientFactory
Installation
NuGet Package Manager
Install-Package NetEvolve.HealthPublishers.Opsgenie
.NET CLI
dotnet add package NetEvolve.HealthPublishers.Opsgenie
PackageReference
<PackageReference Include="NetEvolve.HealthPublishers.Opsgenie" Version="x.x.x" />
Quick Start
using NetEvolve.HealthPublishers.Opsgenie;
var builder = services.AddHealthChecks();
builder.AddOpsgeniePublisher(options =>
{
options.ApiKey = "<api-key>";
options.SystemIdentifier = "checkout-service";
});
Usage
Basic Example
Register under the default name ("Default"), configured via code:
var builder = services.AddHealthChecks();
builder.AddOpsgeniePublisher(options =>
{
options.ApiKey = "<api-key>"; // Required, sent as the Authorization: GenieKey <api-key> header
options.SystemIdentifier = "checkout-service"; // Required, derives the alert alias and tags every alert
options.ApiUrl = new Uri("https://api.eu.opsgenie.com"); // Optional, defaults to https://api.opsgenie.com
});
Advanced Example
Register multiple named Opsgenie targets, each pushing the same health reports to a different team or integration:
var builder = services.AddHealthChecks();
builder.AddOpsgeniePublisher("Platform", options =>
{
options.ApiKey = "<platform-api-key>";
options.SystemIdentifier = "checkout-service";
});
builder.AddOpsgeniePublisher("OnCall", options =>
{
options.ApiKey = "<oncall-api-key>";
options.SystemIdentifier = "checkout-service";
});
Configuration
Code-based
builder.AddOpsgeniePublisher(options =>
{
options.ApiKey = "<api-key>"; // Required
options.SystemIdentifier = "checkout-service"; // Required
options.ApiUrl = new Uri("https://api.eu.opsgenie.com"); // Optional
});
appsettings.json-based
builder.AddOpsgeniePublisher(); // reads the "Default" section below
{
"HealthPublishers": {
"Opsgenie": {
"Default": {
"ApiKey": "<api-key>",
"SystemIdentifier": "checkout-service",
"ApiUrl": "https://api.eu.opsgenie.com"
}
}
}
}
When using an explicit name, the section key must match: builder.AddOpsgeniePublisher("OnCall") reads HealthPublishers:Opsgenie:OnCall.
Requirements
- .NET 8.0 or higher
- An Opsgenie account and API key (integration key) with access to the Alert API
Related Packages
- NetEvolve.HealthPublishers.Abstractions - Shared abstractions used by all
NetEvolve.HealthPublishers.*packages
Documentation
For complete documentation, please visit the official documentation.
Contributing
Contributions are welcome! Please read the Contributing Guidelines before submitting a pull request.
Support
- Issues: Report bugs or request features on GitHub Issues
- Documentation: Read the full documentation at https://github.com/dailydevops/healthpublishers
License
This project is licensed under the MIT License - see the LICENSE file for details.
Made with ❤️ by the NetEvolve Team Visit us at https://www.daily-devops.net for more information about our services and solutions.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. 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. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.10)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.10)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.10)
- Microsoft.Extensions.Diagnostics.HealthChecks (>= 10.0.10)
- Microsoft.Extensions.Http (>= 10.0.10)
- Microsoft.Extensions.Options (>= 10.0.10)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 10.0.10)
-
net8.0
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.10)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.10)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.10)
- Microsoft.Extensions.Diagnostics.HealthChecks (>= 10.0.10)
- Microsoft.Extensions.Http (>= 10.0.10)
- Microsoft.Extensions.Options (>= 10.0.10)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 10.0.10)
-
net9.0
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.10)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.10)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.10)
- Microsoft.Extensions.Diagnostics.HealthChecks (>= 10.0.10)
- Microsoft.Extensions.Http (>= 10.0.10)
- Microsoft.Extensions.Options (>= 10.0.10)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 10.0.10)
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.10.0 | 46 | 7/27/2026 |