Soenneker.Coordinators.Alerts
11.0.1095
Prefix Reserved
dotnet add package Soenneker.Coordinators.Alerts --version 11.0.1095
NuGet\Install-Package Soenneker.Coordinators.Alerts -Version 11.0.1095
<PackageReference Include="Soenneker.Coordinators.Alerts" Version="11.0.1095" />
<PackageVersion Include="Soenneker.Coordinators.Alerts" Version="11.0.1095" />
<PackageReference Include="Soenneker.Coordinators.Alerts" />
paket add Soenneker.Coordinators.Alerts --version 11.0.1095
#r "nuget: Soenneker.Coordinators.Alerts, 11.0.1095"
#:package Soenneker.Coordinators.Alerts@11.0.1095
#addin nuget:?package=Soenneker.Coordinators.Alerts&version=11.0.1095
#tool nuget:?package=Soenneker.Coordinators.Alerts&version=11.0.1095
Soenneker.Coordinators.Alerts
Validates Azure Monitor common alert schema callbacks, builds an Adaptive Card, and sends it to the Microsoft Teams Errors channel.
Install
dotnet add package Soenneker.Coordinators.Alerts
Configuration
{
"Api": {
"Alerts": {
"AzureApiKey": "replace-with-a-random-secret"
}
},
"Environment": "Production",
"MsTeams": {
"UseQueue": false,
"Enabled": true,
"Errors": {
"Enabled": true,
"WebhookUrl": "https://..."
}
}
}
When MsTeams:UseQueue is true, Microsoft Teams delivery is placed on the configured service bus instead of sent to MsTeams:Errors:WebhookUrl immediately.
Registration
using Soenneker.Coordinators.Alerts.Registrars;
using Microsoft.Extensions.DependencyInjection;
var services = new ServiceCollection();
services.AddAlertsCoordinatorAsSingleton();
Use AddAlertsCoordinatorAsScoped() when the coordinator and its Microsoft Teams dependencies should follow a dependency-injection scope.
Usage
using Soenneker.Coordinators.Alerts.Abstract;
using Soenneker.Requests.Azure.Alerts;
public sealed class AzureAlertHandler(IAlertsCoordinator alerts)
{
public ValueTask<bool?> Handle(string apiKey, CasRequest request, CancellationToken cancellationToken)
{
return alerts.CreateAzure(apiKey, request, cancellationToken);
}
}
CreateAzure compares the supplied key with Api:Alerts:AzureApiKey, then reads Data.Essentials from the common alert schema request. A valid alert is formatted with its monitor condition, rule, first metric condition, severity, configured environment, and fired time converted to US Eastern time.
The result is true after the Teams utility accepts the card and false when alert essentials are missing. An invalid API key throws UnauthorizedAccessException. Downstream Teams or service-bus failures propagate to the caller.
Security and operation
- API keys are compared through fixed-size hashes using a fixed-time comparison. Store the configured key in a secret provider rather than source-controlled JSON.
- Incoming alert payloads are not serialized into logs by this coordinator. Alert fields may still appear in the Teams card and should be treated according to their data sensitivity.
- The card links to Azure's Alerts Management page rather than a resource-specific alert URL.
- With queued delivery, successful completion means the message was accepted by the queue, not delivered to Teams.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net11.0 is compatible. |
-
net11.0
- Soenneker.Coordinators.Base (>= 11.0.1165)
- Soenneker.MsTeams.Util (>= 11.0.1367)
- Soenneker.Requests.Azure.Alerts (>= 11.0.65)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Soenneker.Coordinators.Alerts:
| Package | Downloads |
|---|---|
|
Soenneker.Controllers.Alerts
AlertsController provides endpoints for receiving Azure alerts and other similar requests |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 11.0.1095 | 0 | 11/15/2026 |
| 11.0.1094 | 39 | 11/14/2026 |
| 11.0.1093 | 104 | 11/12/2026 |
| 11.0.1092 | 94 | 11/12/2026 |
| 11.0.1091 | 90 | 11/12/2026 |
| 11.0.1090 | 89 | 11/11/2026 |
| 11.0.1089 | 87 | 11/11/2026 |
| 11.0.1087 | 92 | 11/11/2026 |
| 11.0.1085 | 91 | 11/11/2026 |
| 11.0.1084 | 96 | 11/11/2026 |
| 11.0.1083 | 93 | 11/11/2026 |
| 11.0.1082 | 79 | 11/11/2026 |
| 11.0.1079 | 91 | 11/11/2026 |
| 11.0.1078 | 105 | 11/11/2026 |
| 11.0.1077 | 78 | 11/10/2026 |
| 11.0.1076 | 304 | 11/3/2026 |
| 11.0.1075 | 89 | 11/3/2026 |
| 11.0.1074 | 86 | 11/3/2026 |
| 11.0.1073 | 103 | 11/3/2026 |
| 11.0.1072 | 98 | 11/3/2026 |
Update dependency Soenneker.MsTeams.Util to 11.0.1367 (#1631)