You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
publicstaticMonitoringFacadeMonitorApplicationLoadBalancer(thisMonitoringFacademonitoringFacade,ApplicationLoadBalanceralb,stringregion="us-west-2"){ArgumentException.ThrowIfNullOrWhiteSpace(region,nameof(region));varalbDimensions=newDictionary<string,string>{{"LoadBalancer",alb.LoadBalancerFullName}};//Note that the label inclucdes CloudWatch dynamic lables -- https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/graph-dynamic-labels.htmlvartarget5xx=(Metric)metricFactory.CreateMetric("HTTPCode_Target_5XX_Count",MetricStatistic.SUM,"${LABEL} [avg: ${AVG}, min: ${MIN}, max: ${MAX}]",albDimensions,default,AwsAlbNamespace);vartarget5xxMetricWithAlarm=newCustomMetricWithAlarm{AddAlarm=newDictionary<string,ICustomThreshold>{{"critical",newCustomThreshold{Threshold=1,ComparisonOperator=ComparisonOperator.GREATER_THAN_OR_EQUAL_TO_THRESHOLD,//We do not have sufficient traffic to treat as breachingTreatMissingDataOverride=TreatMissingData.NOT_BREACHING}}},AlarmFriendlyName="5xx-alarm",Metric=target5xx};returnmonitoringFacade.MonitorCustom(newCustomMonitoringProps{//Each "CustomMetricGroup" is a CloudWatch graph. Each graph is composed of [1..n] metricsMetricGroups=[newCustomMetricGroup{Metrics=[target5xxMetricWithAlarm],Title="HTTP 5XXs"},],AlarmFriendlyName="alb",HumanReadableName=$"Application Load Balancer [{alb.LoadBalancerName}](https://{region}.console.aws.amazon.com/ec2/home?region={region}#LoadBalancer:loadBalancerArn={alb.LoadBalancerArn})"});}
Note that the output graph annotations contains the dynamic label placeholders.
Expected behavior
Expect that the output annotation does not contain the dynamic labels. e.g. Contains the metric and thresholds being monitored.
e.g. "HTTPCode_Target_5XX_Count > 1 for 5 minutes"
Actual behavior
The output annotation contains the dynamic labels placeholders. .e.g "${LABEL} [avg: ${AVG}, min: ${MIN}, max: ${MAX}]"
Version
7.6.0
Steps and/or minimal code example to reproduce
Note that the output graph annotations contains the dynamic label placeholders.
Expected behavior
Expect that the output annotation does not contain the dynamic labels. e.g. Contains the metric and thresholds being monitored.
e.g. "HTTPCode_Target_5XX_Count > 1 for 5 minutes"
Actual behavior
The output annotation contains the dynamic labels placeholders. .e.g "${LABEL} [avg: ${AVG}, min: ${MIN}, max: ${MAX}]"
Other details
See https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/graph-dynamic-labels.html
The text was updated successfully, but these errors were encountered: