How to use monitorCustom #181
Answered
by
echeung-amzn
wernermorgenstern
asked this question in
Q&A
-
I was wondering if anybody has sample code in how to use |
Beta Was this translation helpful? Give feedback.
Answered by
echeung-amzn
Jun 28, 2022
Replies: 1 comment 3 replies
-
We need to write some more documentation for it (#153). In general, you can just pass in some metrics like so: this.facade.monitorCustom({
alarmFriendlyName: 'My-Custom-Alarm',
description: 'Sample custom alarm',
metricGroups: [
{
title: 'Errors-Sum',
metrics: [
{
alarmFriendlyName: 'UnknownError-Sum',
metric: new Metric({
// cf. whatever you have in Cloudwatch metrics
namespace: 'MyNameSpace',
metricName: 'AnError',
statistic: MetricStatistic.SUM,
dimensionsMap: {
MyDimen: 'DimenValue',
},
}),
addAlarm: {
Critical: {
comparisonOperator: ComparisonOperator.GREATER_THAN_THRESHOLD,
treatMissingDataOverride: TreatMissingData.IGNORE,
threshold: 0,
actionOverride: ...,
},
},
},
],
},
],
}); |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
ayush987goyal
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We need to write some more documentation for it (#153).
In general, you can just pass in some metrics like so: