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
                    
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.Coordinators.Alerts" Version="11.0.1095" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Coordinators.Alerts" Version="11.0.1095" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.Coordinators.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.Coordinators.Alerts --version 11.0.1095
                    
#r "nuget: Soenneker.Coordinators.Alerts, 11.0.1095"
                    
#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.Coordinators.Alerts@11.0.1095
                    
#: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.Coordinators.Alerts&version=11.0.1095
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Coordinators.Alerts&version=11.0.1095
                    
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.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 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.

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
Loading failed

Update dependency Soenneker.MsTeams.Util to 11.0.1367 (#1631)