0.1.111 • Published 1 year ago

@azbake/ingredient-metric-alert v0.1.111

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

Changelogs

Overview

The Metric Alert ingredient is a plugin for Bake. When included in a recipe, this plugin will create a custom Alert Rule for an Azure resource.

Usage

Recipe

name: Event Hub Namespace for diagnostics with a custom metric alert
shortName: diagnostics
version: 0.0.1
ingredients:
  - "@azbake/ingredient-metric-alert@~0"
  - "@azbake/ingredient-event-hub-namespace@~0"
parallelRegions: true
#rgOverride:
resourceGroup: true
variables:
recipe:
  ehndiag-deploy: 
    properties:
      type: "@azbake/ingredient-event-hub-namespace"
      source: ""
      parameters:    
        eventHubNamespaceName: "[eventhubnamespace.get_resource_name()]"            
        skuName: Standard
        skuTier: Standard
        skuCapacity: "1"
        isAutoInflateEnabled: "true"
        maximumThroughputUnits: "10"  
  alert-deploy: 
    properties:
      type: "@azbake/ingredient-metric-alert"
      source: "[eventhubnamespace.get_resource_profile()]"
      parameters:
        alertName: "Event Hub Namespace Alert"
        alertDescription: "New alert created via Bake"
        alertSeverity: 3
        isEnabled: true
        source-type: "Microsoft.EventHub/namespaces"
        metricName: "ThrottledRequests"
        operator: "GreaterThan"
        threshold: "0"
        timeAggregation: "Maximum"
        windowSize: "PT5M"
        evaluationFrequency: "PT5M"
        actionGroupName: "[coreutils.create_resource_name('act','emailops', false)]"
        actionGroupResourceGroup: "[coreutils.create_resource_name('','actiongroups', true)]"
        #Uncomment below and comment above if using rgOverride 
        #actionGroupResourceGroup: "[coreutils.resource_group()]"
        #alertType: "Static"
        alertType: "Dynamic"
        #Dynamic alert params have defaults.  Uncomment and specify below to override defaults.
        # dynamicAlertParameters:
        #   alertSensitivity: "Low"
        #   failingPeriods:
        #     numberOfEvaluationPeriods: "4"
        #     minFailingPeriodsToAlert: "3"
    dependsOn:
      - ehndiag-deploy
propertyrequireddescription
sourceyesName of the target resource for the metric that the alert is monitoring.
alertNameyesName of the Alert resource.
alertSeverityno (default 3)The severity level of the alert.
isEnabledno (default true)Specifies whether the alert is enabled.
source-typeyesThe metric namespace of the alert. An example is Microsoft.KeyVault/vaults.
metricNameyesThe name of the metric that the alert is monitoring.
operatoryesThe comparison operator for the alert.
thresholdyesThe threshold value to trigger the alert.
timeAggregationno (default Average)The aggregation function used for comparing against the threshold.
windowSizeno (default PT5M)Period of time used to monitor alert activity based on the threshold. Must be between five minutes and one day. ISO 8601 duration format.
evaluationFrequencyno (default PT5M)How often the metric alert is evaluated represented in ISO 8601 duration format.
actionGroupNameyesThe name of the action group to trigger when the alert is fired.
actionGroupResourceGroupyesThe action group's resource group.
alertTypeyesStatic or Dynamic (AIOps)
dynamicAlertPropertiesno (default below)Object for specifying dynamic alert properties.

dynamicAlertProperties object

propertyrequireddescription
alertSensitivityno (default Low)Low, Medium, and High sensitivities (in order of least to most noisy alerts.)
failingPeriodsno (default below)Object for specifying dynamic alert failing periods properties.

failingPeriods object - this advanced criteria defaults to fire the alert if 3 of of the last 4 evaluation periods failed

propertyrequireddescription
numberOfEvaluationPeriodsno (default 4)The total number of periods for evaluating against the failing periods.
minFailingPeriodsToAlertno (default 3)The minimum number of failing periods to fire the alert.

See Azure Monitor documentation for additional details

Platform metric alert rules - Using Resource Manager template

Azure Monitor REST API - Metric Alerts - Create or Update

Utilities

Utility classes can be used inside of the bake.yaml file for parameter and source values.

metricalert class

No functions at this time.

0.1.111

1 year ago

0.1.107

2 years ago

0.1.106

2 years ago

0.1.109

2 years ago

0.1.108

2 years ago

0.1.110

2 years ago

0.1.105

2 years ago

0.1.104

4 years ago

0.1.103

4 years ago

0.1.102

4 years ago

0.1.101

4 years ago

0.1.100

4 years ago

0.1.99

4 years ago

0.1.98

4 years ago

0.1.97

4 years ago

0.1.96

4 years ago

0.1.95

4 years ago

0.1.92

4 years ago

0.1.87

4 years ago

0.1.75

5 years ago

0.1.72

5 years ago