Skip to content

Instantly share code, notes, and snippets.

@skurik
Created August 5, 2021 07:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save skurik/2b208da43433694989d2ddd25a55f8df to your computer and use it in GitHub Desktop.
Save skurik/2b208da43433694989d2ddd25a55f8df to your computer and use it in GitHub Desktop.
public sealed class AzureRedisAlerts
{
public readonly MewsResource<MetricAlert<RedisCache>> MemoryHigh = MewsResource<MetricAlert<RedisCache>>.CreateManaged(
name: "redis-memory-high",
resource: new MetricAlert<RedisCache>(
resourceGroup: ResourceDependency<ResourceGroup>.Create<AzureResourceGroups>(g => g.Monitoring),
actionGroup: ResourceDependency<ActionGroup>.Create<AzureActionGroups>(g => g.Default),
targetResource: ResourceDependency<RedisCache>.Create<AzureRedisCaches>(c => c.WestEurope),
description: "Redis memory high"
)
);
public RedisAlerts()
{
AllMetricAlerts = new Dictionary<string, MewsResource<MetricAlert<RedisCache>>>
{
{ nameof(MemoryHigh), MemoryHigh }
};
}
public Dictionary<string, MewsResource<MetricAlert<RedisCache>>> AllMetricAlerts { get; }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment