NetEvolve.HealthPublishers.AWS.CloudWatch
1.10.0
Prefix Reserved
dotnet add package NetEvolve.HealthPublishers.AWS.CloudWatch --version 1.10.0
NuGet\Install-Package NetEvolve.HealthPublishers.AWS.CloudWatch -Version 1.10.0
<PackageReference Include="NetEvolve.HealthPublishers.AWS.CloudWatch" Version="1.10.0" />
<PackageVersion Include="NetEvolve.HealthPublishers.AWS.CloudWatch" Version="1.10.0" />
<PackageReference Include="NetEvolve.HealthPublishers.AWS.CloudWatch" />
paket add NetEvolve.HealthPublishers.AWS.CloudWatch --version 1.10.0
#r "nuget: NetEvolve.HealthPublishers.AWS.CloudWatch, 1.10.0"
#:package NetEvolve.HealthPublishers.AWS.CloudWatch@1.10.0
#addin nuget:?package=NetEvolve.HealthPublishers.AWS.CloudWatch&version=1.10.0
#tool nuget:?package=NetEvolve.HealthPublishers.AWS.CloudWatch&version=1.10.0
NetEvolve.HealthPublishers.AWS.CloudWatch
An IHealthCheckPublisher implementation that publishes HealthReport results as metrics to Amazon CloudWatch, using the official AWSSDK.CloudWatch client.
Features
- Publishes an overall status and duration metric per report, plus a status and duration metric per individual health check
- Tags every metric with the machine name and a required, free-form
SystemIdentifierto tell instances apart, and each per-check metric additionally with the check name - Supports explicit AWS credentials or the default AWS credential resolution chain
- Supports a custom service endpoint, useful for VPC endpoints or CloudWatch-compatible services such as LocalStack
- Configuration- or builder-based setup, consistent with the
NetEvolve.HealthPublishers.*conventions - Named registrations to publish to multiple CloudWatch targets side by side
- Uses the official
AWSSDK.CloudWatchclient
Installation
NuGet Package Manager
Install-Package NetEvolve.HealthPublishers.AWS.CloudWatch
.NET CLI
dotnet add package NetEvolve.HealthPublishers.AWS.CloudWatch
PackageReference
<PackageReference Include="NetEvolve.HealthPublishers.AWS.CloudWatch" Version="x.x.x" />
Quick Start
using NetEvolve.HealthPublishers.AWS.CloudWatch;
var builder = services.AddHealthChecks();
builder.AddAWSCloudWatchPublisher(options =>
{
options.Region = "eu-central-1";
options.Namespace = "HealthChecks";
options.SystemIdentifier = "checkout-service";
});
Usage
Basic Example
Register under the default name ("Default"), configured via code:
var builder = services.AddHealthChecks();
builder.AddAWSCloudWatchPublisher(options =>
{
options.Region = "eu-central-1"; // Required, AWS region system name
options.Namespace = "HealthChecks"; // Required, CloudWatch metric namespace
options.SystemIdentifier = "checkout-service"; // Required, tags metrics alongside the machine name
});
Advanced Example
Register multiple named CloudWatch targets, each publishing the same health reports into a different account/region using explicit credentials:
var builder = services.AddHealthChecks();
builder.AddAWSCloudWatchPublisher("Production", options =>
{
options.Region = "eu-central-1";
options.Namespace = "Prod/HealthChecks";
options.AccessKeyId = "<prod-access-key-id>";
options.SecretAccessKey = "<prod-secret-access-key>";
options.SystemIdentifier = "checkout-service";
});
builder.AddAWSCloudWatchPublisher("Staging", options =>
{
options.Region = "eu-west-1";
options.Namespace = "Staging/HealthChecks";
options.SystemIdentifier = "checkout-service";
});
Configuration
Code-based
builder.AddAWSCloudWatchPublisher(options =>
{
options.Region = "eu-central-1"; // Required
options.Namespace = "HealthChecks"; // Required
options.SystemIdentifier = "checkout-service"; // Required
options.AccessKeyId = "<access-key-id>"; // Optional, must be set together with SecretAccessKey
options.SecretAccessKey = "<secret-access-key>"; // Optional, must be set together with AccessKeyId
options.ServiceUrl = new Uri("https://localhost:4566"); // Optional, e.g. for LocalStack or a VPC endpoint
});
appsettings.json-based
builder.AddAWSCloudWatchPublisher(); // reads the "Default" section below
{
"HealthPublishers": {
"AWS": {
"CloudWatch": {
"Default": {
"Region": "eu-central-1",
"Namespace": "HealthChecks",
"SystemIdentifier": "checkout-service"
}
}
}
}
}
When using an explicit name, the section key must match: builder.AddAWSCloudWatchPublisher("Production") reads HealthPublishers:AWS:CloudWatch:Production.
Requirements
- .NET 8.0 or higher
- An AWS account with access to CloudWatch, or a CloudWatch-compatible service reachable via
ServiceUrl
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
- AWSSDK.CloudWatch (>= 4.0.103)
- 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.Options (>= 10.0.10)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 10.0.10)
-
net8.0
- AWSSDK.CloudWatch (>= 4.0.103)
- 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.Options (>= 10.0.10)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 10.0.10)
-
net9.0
- AWSSDK.CloudWatch (>= 4.0.103)
- 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.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 | 51 | 7/27/2026 |