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
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Soenneker.Requests.Azure.Alerts" Version="11.0.65" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Requests.Azure.Alerts" Version="11.0.65" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.Requests.Azure.Alerts" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Soenneker.Requests.Azure.Alerts --version 11.0.65
                    
#r "nuget: Soenneker.Requests.Azure.Alerts, 11.0.65"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Soenneker.Requests.Azure.Alerts@11.0.65
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Soenneker.Requests.Azure.Alerts&version=11.0.65
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Requests.Azure.Alerts&version=11.0.65
                    
Install as a Cake Tool

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

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

  • CasRequest is the webhook envelope and contains SchemaId and Data.
  • CasEssentials contains common metadata such as the rule, severity, monitor condition, target resource IDs, and fired/resolved timestamps.
  • CasAlertContext contains signal-specific details. Its Condition models metric conditions; Properties remains an object because Azure can supply an arbitrary property shape.
  • CasCondition, CasAllOf, and CasDimension represent 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 Compatible and additional computed target framework versions.
.NET net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • 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
Loading failed

Upgrade .NET 11 release candidates to stable