Soenneker.Requests.Azure.Alerts
11.0.65
Prefix Reserved
dotnet add package Soenneker.Requests.Azure.Alerts --version 11.0.65
NuGet\Install-Package Soenneker.Requests.Azure.Alerts -Version 11.0.65
<PackageReference Include="Soenneker.Requests.Azure.Alerts" Version="11.0.65" />
<PackageVersion Include="Soenneker.Requests.Azure.Alerts" Version="11.0.65" />
<PackageReference Include="Soenneker.Requests.Azure.Alerts" />
paket add Soenneker.Requests.Azure.Alerts --version 11.0.65
#r "nuget: Soenneker.Requests.Azure.Alerts, 11.0.65"
#:package Soenneker.Requests.Azure.Alerts@11.0.65
#addin nuget:?package=Soenneker.Requests.Azure.Alerts&version=11.0.65
#tool nuget:?package=Soenneker.Requests.Azure.Alerts&version=11.0.65
Soenneker.Requests.Azure.Alerts
DTOs for receiving Azure Monitor webhook notifications that use the Common Alert Schema (CAS).
Installation
dotnet add package Soenneker.Requests.Azure.Alerts
Usage
Use CasRequest as the request body for an ASP.NET Core webhook endpoint:
using Soenneker.Requests.Azure.Alerts;
app.MapPost("/webhooks/azure-alerts", (CasRequest request) =>
{
CasEssentials? alert = request.Data?.Essentials;
if (alert is null)
return Results.BadRequest();
if (alert.MonitorCondition == "Fired")
{
logger.LogWarning(
"Azure alert {AlertRule} fired with severity {Severity} for {Targets}",
alert.AlertRule,
alert.Severity,
alert.AlertTargetIDs);
}
return Results.Ok();
});
For metric alerts, the evaluated clauses are available through the alert context:
IEnumerable<CasAllOf> clauses =
request.Data?.AlertContext?.Condition?.AllOf ?? [];
foreach (CasAllOf clause in clauses)
{
Console.WriteLine(
$"{clause.MetricNamespace}/{clause.MetricName}: " +
$"{clause.MetricValue} {clause.Operator} {clause.Threshold}");
}
Model shape
CasRequestis the webhook envelope and containsSchemaIdandData.CasEssentialscontains common metadata such as the rule, severity, monitor condition, target resource IDs, and fired/resolved timestamps.CasAlertContextcontains signal-specific details. ItsConditionmodels metric conditions;Propertiesremains anobjectbecause Azure can supply an arbitrary property shape.CasCondition,CasAllOf, andCasDimensionrepresent metric evaluation details.
Azure emits different context shapes for metric, log, activity-log, and other alert types, so model members are nullable. When deserializing with System.Text.Json, CasAlertContext.Properties will normally be a JsonElement; inspect or deserialize it into an application-specific type before use.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net11.0 is compatible. |
-
net11.0
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Soenneker.Requests.Azure.Alerts:
| Package | Downloads |
|---|---|
|
Soenneker.Coordinators.Alerts
Handling Azure alerts from the controller |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 11.0.65 | 250 | 11/11/2026 |
| 11.0.64 | 588 | 10/27/2026 |
| 11.0.63 | 220 | 10/26/2026 |
| 11.0.62 | 182 | 10/26/2026 |
| 4.0.61 | 639 | 10/14/2026 |
| 4.0.60 | 169 | 10/14/2026 |
| 4.0.55 | 154 | 10/13/2026 |
| 4.0.54 | 98 | 10/12/2026 |
| 4.0.53 | 204 | 10/11/2026 |
| 4.0.52 | 1,014 | 9/24/2026 |
| 4.0.51 | 543 | 9/15/2026 |
| 4.0.50 | 412 | 9/12/2026 |
| 4.0.49 | 1,355 | 8/30/2026 |
| 4.0.48 | 336 | 8/29/2026 |
| 4.0.47 | 1,792 | 7/28/2026 |
| 4.0.46 | 705 | 7/16/2026 |
| 4.0.45 | 2,633 | 6/18/2026 |
| 4.0.44 | 1,251 | 6/5/2026 |
| 4.0.43 | 1,309 | 4/23/2026 |
| 4.0.42 | 1,427 | 3/12/2026 |
Upgrade .NET 11 release candidates to stable