@cdklabs/multi-az-observability 0.0.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.jsii +10177 -0
- package/API.md +5119 -0
- package/LICENSE +202 -0
- package/README.md +175 -0
- package/cdk.json +68 -0
- package/lib/alarmsandrules/AvailabilityAndLatencyAlarmsAndRules.d.ts +214 -0
- package/lib/alarmsandrules/AvailabilityAndLatencyAlarmsAndRules.js +763 -0
- package/lib/alarmsandrules/BaseOperationRegionalAlarmsAndRules.d.ts +22 -0
- package/lib/alarmsandrules/BaseOperationRegionalAlarmsAndRules.js +21 -0
- package/lib/alarmsandrules/BaseOperationZonalAlarmsAndRules.d.ts +34 -0
- package/lib/alarmsandrules/BaseOperationZonalAlarmsAndRules.js +39 -0
- package/lib/alarmsandrules/CanaryOperationRegionalAlarmsAndRules.d.ts +7 -0
- package/lib/alarmsandrules/CanaryOperationRegionalAlarmsAndRules.js +11 -0
- package/lib/alarmsandrules/CanaryOperationZonalAlarmsAndRules.d.ts +16 -0
- package/lib/alarmsandrules/CanaryOperationZonalAlarmsAndRules.js +17 -0
- package/lib/alarmsandrules/IBaseOperationRegionalAlarmsAndRules.d.ts +18 -0
- package/lib/alarmsandrules/IBaseOperationRegionalAlarmsAndRules.js +3 -0
- package/lib/alarmsandrules/IBaseOperationZonalAlarmsAndRules.d.ts +30 -0
- package/lib/alarmsandrules/IBaseOperationZonalAlarmsAndRules.js +3 -0
- package/lib/alarmsandrules/ICanaryOperationRegionalAlarmsAndRules.d.ts +6 -0
- package/lib/alarmsandrules/ICanaryOperationRegionalAlarmsAndRules.js +3 -0
- package/lib/alarmsandrules/ICanaryOperationZonalAlarmsAndRules.d.ts +12 -0
- package/lib/alarmsandrules/ICanaryOperationZonalAlarmsAndRules.js +3 -0
- package/lib/alarmsandrules/IOperationAlarmsAndRules.d.ts +55 -0
- package/lib/alarmsandrules/IOperationAlarmsAndRules.js +3 -0
- package/lib/alarmsandrules/IServerSideOperationRegionalAlarmsAndRules.d.ts +15 -0
- package/lib/alarmsandrules/IServerSideOperationRegionalAlarmsAndRules.js +3 -0
- package/lib/alarmsandrules/IServerSideOperationZonalAlarmsAndRules.d.ts +36 -0
- package/lib/alarmsandrules/IServerSideOperationZonalAlarmsAndRules.js +3 -0
- package/lib/alarmsandrules/IServiceAlarmsAndRules.d.ts +44 -0
- package/lib/alarmsandrules/IServiceAlarmsAndRules.js +3 -0
- package/lib/alarmsandrules/InsightRuleBody.d.ts +67 -0
- package/lib/alarmsandrules/InsightRuleBody.js +46 -0
- package/lib/alarmsandrules/OperationAlarmsAndRules.d.ts +59 -0
- package/lib/alarmsandrules/OperationAlarmsAndRules.js +135 -0
- package/lib/alarmsandrules/ServerSideOperationRegionalAlarmsAndRules.d.ts +19 -0
- package/lib/alarmsandrules/ServerSideOperationRegionalAlarmsAndRules.js +22 -0
- package/lib/alarmsandrules/ServerSideOperationZonalAlarmsAndRules.d.ts +40 -0
- package/lib/alarmsandrules/ServerSideOperationZonalAlarmsAndRules.js +46 -0
- package/lib/alarmsandrules/ServiceAlarmsAndRules.d.ts +48 -0
- package/lib/alarmsandrules/ServiceAlarmsAndRules.js +166 -0
- package/lib/alarmsandrules/props/BaseOperationRegionalAlarmsAndRulesProps.d.ts +24 -0
- package/lib/alarmsandrules/props/BaseOperationRegionalAlarmsAndRulesProps.js +3 -0
- package/lib/alarmsandrules/props/BaseOperationZonalAlarmsAndRulesProps.d.ts +62 -0
- package/lib/alarmsandrules/props/BaseOperationZonalAlarmsAndRulesProps.js +3 -0
- package/lib/alarmsandrules/props/CanaryOperationRegionalAlarmsAndRulesProps.d.ts +6 -0
- package/lib/alarmsandrules/props/CanaryOperationRegionalAlarmsAndRulesProps.js +3 -0
- package/lib/alarmsandrules/props/CanaryOperationZonalAlarmsAndRulesProps.d.ts +6 -0
- package/lib/alarmsandrules/props/CanaryOperationZonalAlarmsAndRulesProps.js +3 -0
- package/lib/alarmsandrules/props/OperationAlarmsAndRulesProps.d.ts +45 -0
- package/lib/alarmsandrules/props/OperationAlarmsAndRulesProps.js +3 -0
- package/lib/alarmsandrules/props/ServerSideOperationRegionalAlarmsAndRulesProps.d.ts +6 -0
- package/lib/alarmsandrules/props/ServerSideOperationRegionalAlarmsAndRulesProps.js +3 -0
- package/lib/alarmsandrules/props/ServerSideOperationZonalAlarmsAndRulesProps.d.ts +6 -0
- package/lib/alarmsandrules/props/ServerSideOperationZonalAlarmsAndRulesProps.js +3 -0
- package/lib/alarmsandrules/props/ServiceAlarmsAndRulesProps.d.ts +13 -0
- package/lib/alarmsandrules/props/ServiceAlarmsAndRulesProps.js +3 -0
- package/lib/azmapper/AvailabilityZoneMapper.d.ts +86 -0
- package/lib/azmapper/AvailabilityZoneMapper.js +200 -0
- package/lib/azmapper/IAvailabilityZoneMapper.d.ts +86 -0
- package/lib/azmapper/IAvailabilityZoneMapper.js +3 -0
- package/lib/azmapper/props/AvailabilityZoneMapperProps.d.ts +13 -0
- package/lib/azmapper/props/AvailabilityZoneMapperProps.js +3 -0
- package/lib/azmapper/src/index.py +107 -0
- package/lib/canaries/CanaryFunction.d.ts +16 -0
- package/lib/canaries/CanaryFunction.js +152 -0
- package/lib/canaries/CanaryTest.d.ts +10 -0
- package/lib/canaries/CanaryTest.js +84 -0
- package/lib/canaries/ICanaryFunction.d.ts +6 -0
- package/lib/canaries/ICanaryFunction.js +3 -0
- package/lib/canaries/props/AddCanaryTestProps.d.ts +66 -0
- package/lib/canaries/props/AddCanaryTestProps.js +3 -0
- package/lib/canaries/props/CanaryFunctionProps.d.ts +29 -0
- package/lib/canaries/props/CanaryFunctionProps.js +3 -0
- package/lib/canaries/props/CanaryTestProps.d.ts +21 -0
- package/lib/canaries/props/CanaryTestProps.js +3 -0
- package/lib/canaries/props/NetworkConfigurationProps.d.ts +16 -0
- package/lib/canaries/props/NetworkConfigurationProps.js +3 -0
- package/lib/canaries/src/canary.zip +0 -0
- package/lib/dashboards/BasicServiceDashboard.d.ts +10 -0
- package/lib/dashboards/BasicServiceDashboard.js +130 -0
- package/lib/dashboards/ContributorInsightsWidget.d.ts +22 -0
- package/lib/dashboards/ContributorInsightsWidget.js +55 -0
- package/lib/dashboards/IOperationAvailabilityAndLatencyDashboard.d.ts +10 -0
- package/lib/dashboards/IOperationAvailabilityAndLatencyDashboard.js +3 -0
- package/lib/dashboards/IServiceAvailabilityAndLatencyDashboard.d.ts +10 -0
- package/lib/dashboards/IServiceAvailabilityAndLatencyDashboard.js +3 -0
- package/lib/dashboards/OperationAvailabilityAndLatencyDashboard.d.ts +20 -0
- package/lib/dashboards/OperationAvailabilityAndLatencyDashboard.js +588 -0
- package/lib/dashboards/ServiceAvailabilityAndLatencyDashboard.d.ts +24 -0
- package/lib/dashboards/ServiceAvailabilityAndLatencyDashboard.js +475 -0
- package/lib/dashboards/props/BasicServiceDashboardProps.d.ts +23 -0
- package/lib/dashboards/props/BasicServiceDashboardProps.js +3 -0
- package/lib/dashboards/props/ContributorInsightWidgetProps.d.ts +31 -0
- package/lib/dashboards/props/ContributorInsightWidgetProps.js +3 -0
- package/lib/dashboards/props/OperationAvailabilityAndLatencyDashboardProps.d.ts +84 -0
- package/lib/dashboards/props/OperationAvailabilityAndLatencyDashboardProps.js +3 -0
- package/lib/dashboards/props/OperationAvailabilityWidgetProps.d.ts +37 -0
- package/lib/dashboards/props/OperationAvailabilityWidgetProps.js +3 -0
- package/lib/dashboards/props/OperationLatencyWidgetProps.d.ts +37 -0
- package/lib/dashboards/props/OperationLatencyWidgetProps.js +3 -0
- package/lib/dashboards/props/ServiceAvailabilityAndLatencyDashboardProps.d.ts +30 -0
- package/lib/dashboards/props/ServiceAvailabilityAndLatencyDashboardProps.js +3 -0
- package/lib/index.d.ts +35 -0
- package/lib/index.js +30 -0
- package/lib/metrics/ApplicationLoadBalancerMetrics.d.ts +36 -0
- package/lib/metrics/ApplicationLoadBalancerMetrics.js +150 -0
- package/lib/metrics/AvailabilityAndLatencyMetrics.d.ts +61 -0
- package/lib/metrics/AvailabilityAndLatencyMetrics.js +212 -0
- package/lib/metrics/NetworkLoadBalancerMetrics.d.ts +19 -0
- package/lib/metrics/NetworkLoadBalancerMetrics.js +48 -0
- package/lib/metrics/RegionalAvailabilityMetrics.d.ts +19 -0
- package/lib/metrics/RegionalAvailabilityMetrics.js +71 -0
- package/lib/metrics/RegionalLatencyMetrics.d.ts +33 -0
- package/lib/metrics/RegionalLatencyMetrics.js +69 -0
- package/lib/metrics/ZonalAvailabilityMetrics.d.ts +19 -0
- package/lib/metrics/ZonalAvailabilityMetrics.js +71 -0
- package/lib/metrics/ZonalLatencyMetrics.d.ts +29 -0
- package/lib/metrics/ZonalLatencyMetrics.js +65 -0
- package/lib/metrics/props/AvailabilityAndLatencyMetricProps.d.ts +23 -0
- package/lib/metrics/props/AvailabilityAndLatencyMetricProps.js +3 -0
- package/lib/metrics/props/AvailabilityMetricProps.d.ts +11 -0
- package/lib/metrics/props/AvailabilityMetricProps.js +3 -0
- package/lib/metrics/props/LatencyMetricProps.d.ts +15 -0
- package/lib/metrics/props/LatencyMetricProps.js +3 -0
- package/lib/metrics/props/RegionalAvailabilityMetricProps.d.ts +6 -0
- package/lib/metrics/props/RegionalAvailabilityMetricProps.js +3 -0
- package/lib/metrics/props/RegionalLatencyMetricProps.d.ts +6 -0
- package/lib/metrics/props/RegionalLatencyMetricProps.js +3 -0
- package/lib/metrics/props/ServiceAvailabilityMetricProps.d.ts +23 -0
- package/lib/metrics/props/ServiceAvailabilityMetricProps.js +3 -0
- package/lib/metrics/props/ServiceLatencyMericProps.d.ts +23 -0
- package/lib/metrics/props/ServiceLatencyMericProps.js +3 -0
- package/lib/metrics/props/ZonalAvailabilityMetricProps.d.ts +10 -0
- package/lib/metrics/props/ZonalAvailabilityMetricProps.js +3 -0
- package/lib/metrics/props/ZonalLatencyMetricProps.d.ts +10 -0
- package/lib/metrics/props/ZonalLatencyMetricProps.js +3 -0
- package/lib/monitoring/src/monitoring-layer.zip +0 -0
- package/lib/outlier-detection/IOutlierDetectionFunction.d.ts +12 -0
- package/lib/outlier-detection/IOutlierDetectionFunction.js +3 -0
- package/lib/outlier-detection/OutlierDetectionFunction.d.ts +16 -0
- package/lib/outlier-detection/OutlierDetectionFunction.js +126 -0
- package/lib/outlier-detection/props/OutlierDetectionFunctionProps.d.ts +12 -0
- package/lib/outlier-detection/props/OutlierDetectionFunctionProps.js +3 -0
- package/lib/outlier-detection/src/outlier-detection.zip +0 -0
- package/lib/outlier-detection/src/scipy-layer.zip +0 -0
- package/lib/services/BasicServiceMultiAZObservability.d.ts +64 -0
- package/lib/services/BasicServiceMultiAZObservability.js +504 -0
- package/lib/services/CanaryMetrics.d.ts +17 -0
- package/lib/services/CanaryMetrics.js +19 -0
- package/lib/services/CanaryTestMetricsOverride.d.ts +39 -0
- package/lib/services/CanaryTestMetricsOverride.js +23 -0
- package/lib/services/ContributorInsightRuleDetails.d.ts +42 -0
- package/lib/services/ContributorInsightRuleDetails.js +23 -0
- package/lib/services/IBasicServiceMultiAZObservability.d.ts +45 -0
- package/lib/services/IBasicServiceMultiAZObservability.js +3 -0
- package/lib/services/ICanaryMetrics.d.ts +14 -0
- package/lib/services/ICanaryMetrics.js +3 -0
- package/lib/services/ICanaryTestMetricsOverride.d.ts +36 -0
- package/lib/services/ICanaryTestMetricsOverride.js +3 -0
- package/lib/services/IContributorInsightRuleDetails.d.ts +38 -0
- package/lib/services/IContributorInsightRuleDetails.js +3 -0
- package/lib/services/IInstrumentedServiceMultiAZObservability.d.ts +39 -0
- package/lib/services/IInstrumentedServiceMultiAZObservability.js +3 -0
- package/lib/services/IOperation.d.ts +75 -0
- package/lib/services/IOperation.js +3 -0
- package/lib/services/IOperationMetricDetails.d.ts +78 -0
- package/lib/services/IOperationMetricDetails.js +3 -0
- package/lib/services/IService.d.ts +76 -0
- package/lib/services/IService.js +3 -0
- package/lib/services/IServiceMetricDetails.d.ts +68 -0
- package/lib/services/IServiceMetricDetails.js +3 -0
- package/lib/services/InstrumentedServiceMultiAZObservability.d.ts +55 -0
- package/lib/services/InstrumentedServiceMultiAZObservability.js +310 -0
- package/lib/services/Operation.d.ts +78 -0
- package/lib/services/Operation.js +34 -0
- package/lib/services/OperationMetricDetails.d.ts +82 -0
- package/lib/services/OperationMetricDetails.js +50 -0
- package/lib/services/Service.d.ts +80 -0
- package/lib/services/Service.js +36 -0
- package/lib/services/ServiceMetricDetails.d.ts +71 -0
- package/lib/services/ServiceMetricDetails.js +28 -0
- package/lib/services/props/BasicServiceMultiAZObservabilityProps.d.ts +126 -0
- package/lib/services/props/BasicServiceMultiAZObservabilityProps.js +3 -0
- package/lib/services/props/CanaryMetricProps.d.ts +14 -0
- package/lib/services/props/CanaryMetricProps.js +3 -0
- package/lib/services/props/CanaryTestMetricsOverrideProps.d.ts +47 -0
- package/lib/services/props/CanaryTestMetricsOverrideProps.js +3 -0
- package/lib/services/props/ContributorInsightRuleDetailsProps.d.ts +38 -0
- package/lib/services/props/ContributorInsightRuleDetailsProps.js +3 -0
- package/lib/services/props/InstrumentedServiceMultiAZObservabilityProps.d.ts +88 -0
- package/lib/services/props/InstrumentedServiceMultiAZObservabilityProps.js +3 -0
- package/lib/services/props/MetricDimensions.d.ts +61 -0
- package/lib/services/props/MetricDimensions.js +63 -0
- package/lib/services/props/OperationMetricDetailsProps.d.ts +97 -0
- package/lib/services/props/OperationMetricDetailsProps.js +3 -0
- package/lib/services/props/OperationProps.d.ts +93 -0
- package/lib/services/props/OperationProps.js +3 -0
- package/lib/services/props/ServiceMetricDetailsProps.d.ts +68 -0
- package/lib/services/props/ServiceMetricDetailsProps.js +3 -0
- package/lib/services/props/ServiceProps.d.ts +69 -0
- package/lib/services/props/ServiceProps.js +3 -0
- package/lib/utilities/AvailabilityMetricType.d.ts +26 -0
- package/lib/utilities/AvailabilityMetricType.js +33 -0
- package/lib/utilities/LatencyMetricType.d.ts +13 -0
- package/lib/utilities/LatencyMetricType.js +20 -0
- package/lib/utilities/OutlierDetectionAlgorithm.d.ts +42 -0
- package/lib/utilities/OutlierDetectionAlgorithm.js +49 -0
- package/lib/utilities/StackWithDynamicSource.d.ts +14 -0
- package/lib/utilities/StackWithDynamicSource.js +82 -0
- package/package.json +176 -0
- package/rosetta/default.ts-fixture +13 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
# multi-az-observability
|
|
2
|
+
This is a CDK construct for multi-AZ observability to help detect single-AZ impairments. This is currently an `alpha` version, but is being used in the AWS [Advanced Multi-AZ Resilience Patterns](https://catalog.workshops.aws/multi-az-gray-failures/en-US) workshop.
|
|
3
|
+
|
|
4
|
+
There is a lot of available information to think through and combine to provide signals about single-AZ impact. To simplify the setup and use reasonable defaults, this construct (available in TypeScript, Go, Python, and .NET [Java coming soon]) sets up the necessary observability. To use the CDK construct, you first define your service like this:
|
|
5
|
+
|
|
6
|
+
```csharp
|
|
7
|
+
var wildRydesService = new Service(new ServiceProps(){
|
|
8
|
+
ServiceName = "WildRydes",
|
|
9
|
+
BaseUrl = "http://www.example.com",
|
|
10
|
+
FaultCountThreshold = 25,
|
|
11
|
+
AvailabilityZoneNames = vpc.AvailabilityZones,
|
|
12
|
+
Period = Duration.Seconds(60),
|
|
13
|
+
LoadBalancer = loadBalancer,
|
|
14
|
+
DefaultAvailabilityMetricDetails = new ServiceMetricDetails(new ServiceMetricDetailsProps() {
|
|
15
|
+
AlarmStatistic = "Sum",
|
|
16
|
+
DatapointsToAlarm = 3,
|
|
17
|
+
EvaluationPeriods = 5,
|
|
18
|
+
FaultAlarmThreshold = 1,
|
|
19
|
+
FaultMetricNames = new string[] { "Fault", "Error" },
|
|
20
|
+
GraphedFaultStatistics = new string[] { "Sum" },
|
|
21
|
+
GraphedSuccessStatistics = new string[] { "Sum" },
|
|
22
|
+
MetricNamespace = metricsNamespace,
|
|
23
|
+
Period = Duration.Seconds(60),
|
|
24
|
+
SuccessAlarmThreshold = 99,
|
|
25
|
+
SuccessMetricNames = new string[] {"Success"},
|
|
26
|
+
Unit = Unit.COUNT,
|
|
27
|
+
}),
|
|
28
|
+
DefaultLatencyMetricDetails = new ServiceMetricDetails(new ServiceMetricDetailsProps(){
|
|
29
|
+
AlarmStatistic = "p99",
|
|
30
|
+
DatapointsToAlarm = 3,
|
|
31
|
+
EvaluationPeriods = 5,
|
|
32
|
+
FaultAlarmThreshold = 1,
|
|
33
|
+
FaultMetricNames = new string[] { "FaultLatency" },
|
|
34
|
+
GraphedFaultStatistics = new string[] { "p50" },
|
|
35
|
+
GraphedSuccessStatistics = new string[] { "p50", "p99", "tm50", "tm99" },
|
|
36
|
+
MetricNamespace = metricsNamespace,
|
|
37
|
+
Period = Duration.Seconds(60),
|
|
38
|
+
SuccessAlarmThreshold = 100,
|
|
39
|
+
SuccessMetricNames = new string[] {"SuccessLatency"},
|
|
40
|
+
Unit = Unit.MILLISECONDS,
|
|
41
|
+
}),
|
|
42
|
+
DefaultContributorInsightRuleDetails = new ContributorInsightRuleDetails(new ContributorInsightRuleDetailsProps() {
|
|
43
|
+
AvailabilityZoneIdJsonPath = azIdJsonPath,
|
|
44
|
+
FaultMetricJsonPath = faultMetricJsonPath,
|
|
45
|
+
InstanceIdJsonPath = instanceIdJsonPath,
|
|
46
|
+
LogGroups = serverLogGroups,
|
|
47
|
+
OperationNameJsonPath = operationNameJsonPath,
|
|
48
|
+
SuccessLatencyMetricJsonPath = successLatencyMetricJsonPath
|
|
49
|
+
}),
|
|
50
|
+
CanaryTestProps = new AddCanaryTestProps() {
|
|
51
|
+
RequestCount = 10,
|
|
52
|
+
LoadBalancer = loadBalancer,
|
|
53
|
+
Schedule = "rate(1 minute)",
|
|
54
|
+
NetworkConfiguration = new NetworkConfigurationProps() {
|
|
55
|
+
Vpc = vpc,
|
|
56
|
+
SubnetSelection = new SubnetSelection() { SubnetType = SubnetType.PRIVATE_ISOLATED }
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
wildRydesService.AddOperation(new Operation(new OperationProps() {
|
|
61
|
+
OperationName = "Signin",
|
|
62
|
+
Path = "/signin",
|
|
63
|
+
Service = wildRydesService,
|
|
64
|
+
Critical = true,
|
|
65
|
+
HttpMethods = new string[] { "GET" },
|
|
66
|
+
ServerSideAvailabilityMetricDetails = new OperationMetricDetails(new OperationMetricDetailsProps() {
|
|
67
|
+
OperationName = "Signin",
|
|
68
|
+
MetricDimensions = new MetricDimensions(new Dictionary<string, string> {{ "Operation", "Signin"}}, "AZ-ID", "Region")
|
|
69
|
+
}, wildRydesService.DefaultAvailabilityMetricDetails),
|
|
70
|
+
ServerSideLatencyMetricDetails = new OperationMetricDetails(new OperationMetricDetailsProps() {
|
|
71
|
+
OperationName = "Signin",
|
|
72
|
+
SuccessAlarmThreshold = 150,
|
|
73
|
+
MetricDimensions = new MetricDimensions(new Dictionary<string, string> {{ "Operation", "Signin"}}, "AZ-ID", "Region")
|
|
74
|
+
}, wildRydesService.DefaultLatencyMetricDetails),
|
|
75
|
+
CanaryTestLatencyMetricsOverride = new CanaryTestMetricsOverride(new CanaryTestMetricsOverrideProps() {
|
|
76
|
+
SuccessAlarmThreshold = 250
|
|
77
|
+
})
|
|
78
|
+
}));
|
|
79
|
+
wildRydesService.AddOperation(new Operation(new OperationProps() {
|
|
80
|
+
OperationName = "Pay",
|
|
81
|
+
Path = "/pay",
|
|
82
|
+
Service = wildRydesService,
|
|
83
|
+
HttpMethods = new string[] { "GET" },
|
|
84
|
+
Critical = true,
|
|
85
|
+
ServerSideAvailabilityMetricDetails = new OperationMetricDetails(new OperationMetricDetailsProps() {
|
|
86
|
+
OperationName = "Pay",
|
|
87
|
+
MetricDimensions = new MetricDimensions(new Dictionary<string, string> {{ "Operation", "Pay"}}, "AZ-ID", "Region")
|
|
88
|
+
}, wildRydesService.DefaultAvailabilityMetricDetails),
|
|
89
|
+
ServerSideLatencyMetricDetails = new OperationMetricDetails(new OperationMetricDetailsProps() {
|
|
90
|
+
OperationName = "Pay",
|
|
91
|
+
SuccessAlarmThreshold = 200,
|
|
92
|
+
MetricDimensions = new MetricDimensions(new Dictionary<string, string> {{ "Operation", "Pay"}}, "AZ-ID", "Region")
|
|
93
|
+
}, wildRydesService.DefaultLatencyMetricDetails),
|
|
94
|
+
CanaryTestLatencyMetricsOverride = new CanaryTestMetricsOverride(new CanaryTestMetricsOverrideProps() {
|
|
95
|
+
SuccessAlarmThreshold = 300
|
|
96
|
+
})
|
|
97
|
+
}));
|
|
98
|
+
wildRydesService.AddOperation(new Operation(new OperationProps() {
|
|
99
|
+
OperationName = "Ride",
|
|
100
|
+
Path = "/ride",
|
|
101
|
+
Service = wildRydesService,
|
|
102
|
+
HttpMethods = new string[] { "GET" },
|
|
103
|
+
Critical = true,
|
|
104
|
+
ServerSideAvailabilityMetricDetails = new OperationMetricDetails(new OperationMetricDetailsProps() {
|
|
105
|
+
OperationName = "Ride",
|
|
106
|
+
MetricDimensions = new MetricDimensions(new Dictionary<string, string> {{ "Operation", "Ride"}}, "AZ-ID", "Region")
|
|
107
|
+
}, wildRydesService.DefaultAvailabilityMetricDetails),
|
|
108
|
+
ServerSideLatencyMetricDetails = new OperationMetricDetails(new OperationMetricDetailsProps() {
|
|
109
|
+
OperationName = "Ride",
|
|
110
|
+
SuccessAlarmThreshold = 350,
|
|
111
|
+
MetricDimensions = new MetricDimensions(new Dictionary<string, string> {{ "Operation", "Ride"}}, "AZ-ID", "Region")
|
|
112
|
+
}, wildRydesService.DefaultLatencyMetricDetails),
|
|
113
|
+
CanaryTestLatencyMetricsOverride = new CanaryTestMetricsOverride(new CanaryTestMetricsOverrideProps() {
|
|
114
|
+
SuccessAlarmThreshold = 550
|
|
115
|
+
})
|
|
116
|
+
}));
|
|
117
|
+
wildRydesService.AddOperation(new Operation(new OperationProps() {
|
|
118
|
+
OperationName = "Home",
|
|
119
|
+
Path = "/home",
|
|
120
|
+
Service = wildRydesService,
|
|
121
|
+
HttpMethods = new string[] { "GET" },
|
|
122
|
+
Critical = true,
|
|
123
|
+
ServerSideAvailabilityMetricDetails = new OperationMetricDetails(new OperationMetricDetailsProps() {
|
|
124
|
+
OperationName = "Home",
|
|
125
|
+
MetricDimensions = new MetricDimensions(new Dictionary<string, string> {{ "Operation", "Ride"}}, "AZ-ID", "Region")
|
|
126
|
+
}, wildRydesService.DefaultAvailabilityMetricDetails),
|
|
127
|
+
ServerSideLatencyMetricDetails = new OperationMetricDetails(new OperationMetricDetailsProps() {
|
|
128
|
+
OperationName = "Home",
|
|
129
|
+
SuccessAlarmThreshold = 100,
|
|
130
|
+
MetricDimensions = new MetricDimensions(new Dictionary<string, string> {{ "Operation", "Ride"}}, "AZ-ID", "Region")
|
|
131
|
+
}, wildRydesService.DefaultLatencyMetricDetails),
|
|
132
|
+
CanaryTestLatencyMetricsOverride = new CanaryTestMetricsOverride(new CanaryTestMetricsOverrideProps() {
|
|
133
|
+
SuccessAlarmThreshold = 200
|
|
134
|
+
})
|
|
135
|
+
}));
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
Then you provide that service definition to the CDK construct.
|
|
139
|
+
|
|
140
|
+
```csharp
|
|
141
|
+
InstrumentedServiceMultiAZObservability multiAvailabilityZoneObservability = new InstrumentedServiceMultiAZObservability(this, "MultiAZObservability", new InstrumentedServiceMultiAZObservabilityProps() {
|
|
142
|
+
Service = wildRydesService,
|
|
143
|
+
CreateDashboards = true,
|
|
144
|
+
Interval = Duration.Minutes(60), // The interval for the dashboard
|
|
145
|
+
OutlierDetectionAlgorithm = OutlierDetectionAlgorithm.STATIC
|
|
146
|
+
});
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
You define some characteristics of the service, default values for metrics and alarms, and then add operations as well as any overrides for default values that you need. The construct can also automatically create synthetic canaries that test each operation with a very simple HTTP check, or you can configure your own synthetics and just tell the construct about the metric details and optionally log files. This creates metrics, alarms, and dashboards that can be used to detect single-AZ impact.
|
|
150
|
+
|
|
151
|
+
If you don't have service specific logs and custom metrics with per-AZ dimensions, you can still use the construct to evaluate ALB and NAT Gateway metrics to find single AZ faults.
|
|
152
|
+
|
|
153
|
+
```csharp
|
|
154
|
+
BasicServiceMultiAZObservability multiAvailabilityZoneObservability = new BasicServiceMultiAZObservability(this, "MultiAZObservability", new BasicServiceMultiAZObservabilityProps() {
|
|
155
|
+
ApplicationLoadBalancers = new IApplicationLoadBalancer[] { loadBalancer },
|
|
156
|
+
NatGateways = new Dictionary<string, CfnNatGateway>() {
|
|
157
|
+
{ "us-east-1a", natGateway1},
|
|
158
|
+
{ "us-east-1b", natGateway2},
|
|
159
|
+
{ "us-east-1c", natGateway3},
|
|
160
|
+
},
|
|
161
|
+
CreateDashboard = true,
|
|
162
|
+
OutlierDetectionAlgorithm = OutlierDetectionAlgorithm.STATIC,
|
|
163
|
+
FaultCountPercentageThreshold = 1.0, // The fault rate to alarm on for errors seen from the ALBs in the same AZ
|
|
164
|
+
PacketLossImpactPercentageThreshold = 0.01, // The percentage of packet loss to alarm on for the NAT Gateways in the same AZ
|
|
165
|
+
ServiceName = "WildRydes",
|
|
166
|
+
Period = Duration.Seconds(60), // The period for metric evaluation
|
|
167
|
+
Interval = Duration.Minutes(60) // The interval for the dashboards
|
|
168
|
+
EvaluationPeriods = 5,
|
|
169
|
+
DatapointsToAlarm = 3
|
|
170
|
+
});
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
If you provide a load balancer, the construct assumes it is deployed in each AZ of the VPC the load balancer is associated with and will look for HTTP metrics using those AZs as dimensions.
|
|
174
|
+
|
|
175
|
+
Both options support running workloads on EC2, ECS, Lambda, and EKS.
|
package/cdk.json
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
{
|
|
2
|
+
"app": "npx ts-node --prefer-ts-exts test/synth-test.ts",
|
|
3
|
+
"watch": {
|
|
4
|
+
"include": [
|
|
5
|
+
"**"
|
|
6
|
+
],
|
|
7
|
+
"exclude": [
|
|
8
|
+
"README.md",
|
|
9
|
+
"cdk*.json",
|
|
10
|
+
"**/*.d.ts",
|
|
11
|
+
"**/*.js",
|
|
12
|
+
"tsconfig.json",
|
|
13
|
+
"package*.json",
|
|
14
|
+
"yarn.lock",
|
|
15
|
+
"node_modules",
|
|
16
|
+
"test"
|
|
17
|
+
]
|
|
18
|
+
},
|
|
19
|
+
"context": {
|
|
20
|
+
"@aws-cdk/aws-lambda:recognizeLayerVersion": true,
|
|
21
|
+
"@aws-cdk/core:checkSecretUsage": true,
|
|
22
|
+
"@aws-cdk/core:target-partitions": [
|
|
23
|
+
"aws",
|
|
24
|
+
"aws-cn"
|
|
25
|
+
],
|
|
26
|
+
"@aws-cdk-containers/ecs-service-extensions:enableDefaultLogDriver": true,
|
|
27
|
+
"@aws-cdk/aws-ec2:uniqueImdsv2TemplateName": true,
|
|
28
|
+
"@aws-cdk/aws-ecs:arnFormatIncludesClusterName": true,
|
|
29
|
+
"@aws-cdk/aws-iam:minimizePolicies": true,
|
|
30
|
+
"@aws-cdk/core:validateSnapshotRemovalPolicy": true,
|
|
31
|
+
"@aws-cdk/aws-codepipeline:crossAccountKeyAliasStackSafeResourceName": true,
|
|
32
|
+
"@aws-cdk/aws-s3:createDefaultLoggingPolicy": true,
|
|
33
|
+
"@aws-cdk/aws-sns-subscriptions:restrictSqsDescryption": true,
|
|
34
|
+
"@aws-cdk/aws-apigateway:disableCloudWatchRole": true,
|
|
35
|
+
"@aws-cdk/core:enablePartitionLiterals": true,
|
|
36
|
+
"@aws-cdk/aws-events:eventsTargetQueueSameAccount": true,
|
|
37
|
+
"@aws-cdk/aws-iam:standardizedServicePrincipals": true,
|
|
38
|
+
"@aws-cdk/aws-ecs:disableExplicitDeploymentControllerForCircuitBreaker": true,
|
|
39
|
+
"@aws-cdk/aws-iam:importedRoleStackSafeDefaultPolicyName": true,
|
|
40
|
+
"@aws-cdk/aws-s3:serverAccessLogsUseBucketPolicy": true,
|
|
41
|
+
"@aws-cdk/aws-route53-patters:useCertificate": true,
|
|
42
|
+
"@aws-cdk/customresources:installLatestAwsSdkDefault": false,
|
|
43
|
+
"@aws-cdk/aws-rds:databaseProxyUniqueResourceName": true,
|
|
44
|
+
"@aws-cdk/aws-codedeploy:removeAlarmsFromDeploymentGroup": true,
|
|
45
|
+
"@aws-cdk/aws-apigateway:authorizerChangeDeploymentLogicalId": true,
|
|
46
|
+
"@aws-cdk/aws-ec2:launchTemplateDefaultUserData": true,
|
|
47
|
+
"@aws-cdk/aws-secretsmanager:useAttachedSecretResourcePolicyForSecretTargetAttachments": true,
|
|
48
|
+
"@aws-cdk/aws-redshift:columnId": true,
|
|
49
|
+
"@aws-cdk/aws-stepfunctions-tasks:enableEmrServicePolicyV2": true,
|
|
50
|
+
"@aws-cdk/aws-ec2:restrictDefaultSecurityGroup": true,
|
|
51
|
+
"@aws-cdk/aws-apigateway:requestValidatorUniqueId": true,
|
|
52
|
+
"@aws-cdk/aws-kms:aliasNameRef": true,
|
|
53
|
+
"@aws-cdk/aws-autoscaling:generateLaunchTemplateInsteadOfLaunchConfig": true,
|
|
54
|
+
"@aws-cdk/core:includePrefixInUniqueNameGeneration": true,
|
|
55
|
+
"@aws-cdk/aws-efs:denyAnonymousAccess": true,
|
|
56
|
+
"@aws-cdk/aws-opensearchservice:enableOpensearchMultiAzWithStandby": true,
|
|
57
|
+
"@aws-cdk/aws-lambda-nodejs:useLatestRuntimeVersion": true,
|
|
58
|
+
"@aws-cdk/aws-efs:mountTargetOrderInsensitiveLogicalId": true,
|
|
59
|
+
"@aws-cdk/aws-rds:auroraClusterChangeScopeOfInstanceParameterGroupWithEachParameters": true,
|
|
60
|
+
"@aws-cdk/aws-appsync:useArnForSourceApiAssociationIdentifier": true,
|
|
61
|
+
"@aws-cdk/aws-rds:preventRenderingDeprecatedCredentials": true,
|
|
62
|
+
"@aws-cdk/aws-codepipeline-actions:useNewDefaultBranchForCodeCommitSource": true,
|
|
63
|
+
"@aws-cdk/aws-cloudwatch-actions:changeLambdaPermissionLogicalIdForLambdaAction": true,
|
|
64
|
+
"@aws-cdk/aws-codepipeline:crossAccountKeysDefaultValueToFalse": true,
|
|
65
|
+
"@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2": true,
|
|
66
|
+
"@aws-cdk/aws-kms:reduceCrossAccountRegionPolicyScope": true
|
|
67
|
+
}
|
|
68
|
+
}
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
import { IAlarm, CfnInsightRule } from 'aws-cdk-lib/aws-cloudwatch';
|
|
2
|
+
import { CfnNatGateway } from 'aws-cdk-lib/aws-ec2';
|
|
3
|
+
import { IApplicationLoadBalancer } from 'aws-cdk-lib/aws-elasticloadbalancingv2';
|
|
4
|
+
import { IFunction } from 'aws-cdk-lib/aws-lambda';
|
|
5
|
+
import { Construct, IConstruct } from 'constructs';
|
|
6
|
+
import { IAvailabilityZoneMapper } from '../azmapper/IAvailabilityZoneMapper';
|
|
7
|
+
import { IContributorInsightRuleDetails } from '../services/IContributorInsightRuleDetails';
|
|
8
|
+
import { IOperation } from '../services/IOperation';
|
|
9
|
+
import { IOperationMetricDetails } from '../services/IOperationMetricDetails';
|
|
10
|
+
import { OutlierDetectionAlgorithm } from '../utilities/OutlierDetectionAlgorithm';
|
|
11
|
+
/**
|
|
12
|
+
* Class used to create availability and latency alarms and Contributor Insight rules
|
|
13
|
+
*/
|
|
14
|
+
export declare class AvailabilityAndLatencyAlarmsAndRules {
|
|
15
|
+
/**
|
|
16
|
+
* Creates a zonal availability alarm
|
|
17
|
+
* @param scope
|
|
18
|
+
* @param metricDetails
|
|
19
|
+
* @param availabilityZoneId
|
|
20
|
+
* @param nameSuffix
|
|
21
|
+
* @param counter
|
|
22
|
+
* @returns
|
|
23
|
+
*/
|
|
24
|
+
static createZonalAvailabilityAlarm(scope: Construct, metricDetails: IOperationMetricDetails, availabilityZoneId: string, counter: number, nameSuffix?: string): IAlarm;
|
|
25
|
+
/**
|
|
26
|
+
* Creates a zonal latency alarm
|
|
27
|
+
* @param scope
|
|
28
|
+
* @param metricDetails
|
|
29
|
+
* @param availabilityZoneId
|
|
30
|
+
* @param nameSuffix
|
|
31
|
+
* @param counter
|
|
32
|
+
* @returns
|
|
33
|
+
*/
|
|
34
|
+
static createZonalLatencyAlarm(scope: Construct, metricDetails: IOperationMetricDetails, availabilityZoneId: string, counter: number, nameSuffix?: string): IAlarm;
|
|
35
|
+
/**
|
|
36
|
+
* Creates a composite alarm when either latency or availability is breached in the Availabiltiy Zone
|
|
37
|
+
* @param scope
|
|
38
|
+
* @param operation
|
|
39
|
+
* @param availabilityZoneId
|
|
40
|
+
* @param nameSuffix
|
|
41
|
+
* @param counter
|
|
42
|
+
* @param zonalAvailabilityAlarm
|
|
43
|
+
* @param zonalLatencyAlarm
|
|
44
|
+
* @returns
|
|
45
|
+
*/
|
|
46
|
+
static createZonalAvailabilityOrLatencyCompositeAlarm(scope: Construct, operationName: string, availabilityZoneId: string, counter: number, zonalAvailabilityAlarm: IAlarm, zonalLatencyAlarm: IAlarm, nameSuffix?: string): IAlarm;
|
|
47
|
+
/**
|
|
48
|
+
* An alarm that compares error rate in this AZ to the overall region error based only on metric data
|
|
49
|
+
* @param scope
|
|
50
|
+
* @param metricDetails
|
|
51
|
+
* @param availabilityZoneId
|
|
52
|
+
* @param nameSuffix
|
|
53
|
+
* @param counter
|
|
54
|
+
* @param outlierThreshold
|
|
55
|
+
* @returns
|
|
56
|
+
*/
|
|
57
|
+
static createZonalFaultRateStaticOutlierAlarm(scope: Construct, metricDetails: IOperationMetricDetails, availabilityZoneId: string, counter: number, outlierThreshold: number, nameSuffix?: string): IAlarm;
|
|
58
|
+
static createZonalFaultRateOutlierAlarm(scope: IConstruct, metricDetails: IOperationMetricDetails, availabilityZoneId: string, allAvailabilityZoneIds: string[], outlierThreshold: number, outlierDetectionFunction: IFunction, outlierDetectionAlgorithm: OutlierDetectionAlgorithm, counter: number, nameSuffix?: string): IAlarm;
|
|
59
|
+
static createZonalFaultRateOutlierAlarmForAlb(scope: IConstruct, loadBalancers: IApplicationLoadBalancer[], availabilityZoneId: string, outlierThreshold: number, outlierDetectionFunction: IFunction, outlierDetectionAlgorithm: OutlierDetectionAlgorithm, azMapper: IAvailabilityZoneMapper, counter: number, evaluationPeriods: number, datapointsToAlarm: number, nameSuffix?: string): IAlarm;
|
|
60
|
+
static createZonalFaultRateOutlierAlarmForNatGW(scope: IConstruct, natGateways: {
|
|
61
|
+
[key: string]: CfnNatGateway[];
|
|
62
|
+
}, availabilityZoneId: string, outlierThreshold: number, outlierDetectionFunction: IFunction, outlierDetectionAlgorithm: OutlierDetectionAlgorithm, azMapper: IAvailabilityZoneMapper, counter: number, evaluationPeriods: number, datapointsToAlarm: number, nameSuffix?: string): IAlarm;
|
|
63
|
+
static createZonalHighLatencyOutlierAlarm(scope: IConstruct, metricDetails: IOperationMetricDetails, availabilityZoneId: string, allAvailabilityZoneIds: string[], outlierThreshold: number, outlierDetectionFunction: IFunction, outlierDetectionAlgorithm: OutlierDetectionAlgorithm, counter: number, nameSuffix?: string): IAlarm;
|
|
64
|
+
static createZonalHighLatencyStaticOutlierAlarm(scope: Construct, metricDetails: IOperationMetricDetails, availabilityZoneId: string, counter: number, outlierThreshold: number, nameSuffix?: string): IAlarm;
|
|
65
|
+
/**
|
|
66
|
+
* An insight rule that calculates how many instances are responding to requests in
|
|
67
|
+
* the specified AZ. Only useful for server-side metrics since the canary doesn't record instance id metrics.
|
|
68
|
+
* @param scope
|
|
69
|
+
* @param metricDetails
|
|
70
|
+
* @param availabilityZoneId
|
|
71
|
+
* @param logGroups
|
|
72
|
+
* @param nameSuffix
|
|
73
|
+
* @param counter
|
|
74
|
+
* @param instanceIdPath
|
|
75
|
+
* @param operationNamePath
|
|
76
|
+
* @param availabilityZoneIdPath
|
|
77
|
+
* @returns
|
|
78
|
+
*/
|
|
79
|
+
static createServerSideInstancesHandlingRequestsInThisAZRule(scope: Construct, operationName: string, availabilityZoneId: string, ruleDetails: IContributorInsightRuleDetails, counter: number, nameSuffix?: string): CfnInsightRule;
|
|
80
|
+
/**
|
|
81
|
+
* An insight rule that calculates the instances contributing to errors
|
|
82
|
+
* in this AZ. Only useful for server-side metrics since the canary doesn't record instance id metrics.
|
|
83
|
+
* @param scope
|
|
84
|
+
* @param operation
|
|
85
|
+
* @param availabilityZoneId
|
|
86
|
+
* @param logGroups
|
|
87
|
+
* @param nameSuffix
|
|
88
|
+
* @param counter
|
|
89
|
+
* @param instanceIdPath
|
|
90
|
+
* @param operationNamePath
|
|
91
|
+
* @param availabilityZoneIdPath
|
|
92
|
+
* @param errorMetricPath
|
|
93
|
+
* @returns
|
|
94
|
+
*/
|
|
95
|
+
static createServerSideInstanceFaultContributorsInThisAZRule(scope: Construct, operationName: string, availabilityZoneId: string, ruleDetails: IContributorInsightRuleDetails, counter: number, nameSuffix?: string): CfnInsightRule;
|
|
96
|
+
/**
|
|
97
|
+
* An insight rule that calculates instances contributing to high latency in this AZ. Only
|
|
98
|
+
* useful for server-side metrics since the canary doesn't record instance id metrics.
|
|
99
|
+
* @param scope
|
|
100
|
+
* @param metricDetails
|
|
101
|
+
* @param availabilityZoneId
|
|
102
|
+
* @param logGroups
|
|
103
|
+
* @param nameSuffix
|
|
104
|
+
* @param counter
|
|
105
|
+
* @returns
|
|
106
|
+
*/
|
|
107
|
+
static createServerSideInstanceHighLatencyContributorsInThisAZRule(scope: Construct, metricDetails: IOperationMetricDetails, availabilityZoneId: string, ruleDetails: IContributorInsightRuleDetails, counter: number, nameSuffix?: string): CfnInsightRule;
|
|
108
|
+
/**
|
|
109
|
+
* An alarm that indicates some percentage of the instances in this AZ are producing errors. Only
|
|
110
|
+
* useful for server-side metrics since the canary doesn't record instance id metrics.
|
|
111
|
+
* @param scope
|
|
112
|
+
* @param metricDetails
|
|
113
|
+
* @param availabilityZoneId
|
|
114
|
+
* @param nameSuffix
|
|
115
|
+
* @param counter
|
|
116
|
+
* @param outlierThreshold
|
|
117
|
+
* @param instanceFaultRateContributorsInThisAZ
|
|
118
|
+
* @param instancesHandlingRequestsInThisAZ
|
|
119
|
+
* @returns
|
|
120
|
+
*/
|
|
121
|
+
static createServerSideZonalMoreThanOneInstanceProducingFaultsAlarm(scope: Construct, metricDetails: IOperationMetricDetails, availabilityZoneId: string, counter: number, outlierThreshold: number, instanceFaultRateContributorsInThisAZ: CfnInsightRule, instancesHandlingRequestsInThisAZ: CfnInsightRule, nameSuffix?: string): IAlarm;
|
|
122
|
+
/**
|
|
123
|
+
* An alarm indicating more than some percentage of instances in this AZ
|
|
124
|
+
* are contributing to high latency. Only useful for server-side metrics since
|
|
125
|
+
* the canary doesn't record instance id metrics.
|
|
126
|
+
* @param scope
|
|
127
|
+
* @param metricDetails
|
|
128
|
+
* @param availabilityZoneId
|
|
129
|
+
* @param nameSuffix
|
|
130
|
+
* @param counter
|
|
131
|
+
* @param outlierThreshold
|
|
132
|
+
* @param instanceHighLatencyContributorsInThisAZ
|
|
133
|
+
* @param instancesHandlingRequestsInThisAZ
|
|
134
|
+
* @returns
|
|
135
|
+
*/
|
|
136
|
+
static createServerSideZonalMoreThanOneInstanceProducingHighLatencyAlarm(scope: Construct, metricDetails: IOperationMetricDetails, availabilityZoneId: string, counter: number, outlierThreshold: number, instanceHighLatencyContributorsInThisAZ: CfnInsightRule, instancesHandlingRequestsInThisAZ: CfnInsightRule, nameSuffix?: string): IAlarm;
|
|
137
|
+
/**
|
|
138
|
+
* An alarm that indicates this AZ as an outlier
|
|
139
|
+
* for availability or latency. This does not ensure that the errors
|
|
140
|
+
* or latency originate from more than one instance.
|
|
141
|
+
* @param scope
|
|
142
|
+
* @param operation
|
|
143
|
+
* @param availabilityZoneId
|
|
144
|
+
* @param logGroups
|
|
145
|
+
* @param nameSuffix
|
|
146
|
+
* @param counter
|
|
147
|
+
* @param azIsOutlierForFaultsAlarm
|
|
148
|
+
* @param availabilityImpactAlarm
|
|
149
|
+
* @param azIsOutlierForLatencyAlarm
|
|
150
|
+
* @param latencyImpactAlarm
|
|
151
|
+
* @returns
|
|
152
|
+
*/
|
|
153
|
+
static createCanaryIsolatedAZImpactAlarm(scope: Construct, operationName: string, availabilityZoneId: string, counter: number, azIsOutlierForFaultsAlarm: IAlarm, availabilityImpactAlarm: IAlarm, azIsOutlierForLatencyAlarm: IAlarm, latencyImpactAlarm: IAlarm, nameSuffix?: string): IAlarm;
|
|
154
|
+
/**
|
|
155
|
+
* Creates the server side alarm to identify isolated single AZ
|
|
156
|
+
* impact meaning that this one AZ is affected and the others aren't
|
|
157
|
+
* @param scope
|
|
158
|
+
* @param operation
|
|
159
|
+
* @param availabilityZoneId
|
|
160
|
+
* @param nameSuffix
|
|
161
|
+
* @param counter
|
|
162
|
+
* @param azIsOutlierForFaultsAlarm
|
|
163
|
+
* @param availabilityImpactAlarm
|
|
164
|
+
* @param moreThanOneInstanceContributingToFaults
|
|
165
|
+
* @param azIsOutlierForLatencyAlarm
|
|
166
|
+
* @param latencyImpactAlarm
|
|
167
|
+
* @param moreThanOneInstanceContributingToLatency
|
|
168
|
+
* @returns
|
|
169
|
+
*/
|
|
170
|
+
static createServerSideIsolatedAZImpactAlarm(scope: Construct, operationName: string, availabilityZoneId: string, counter: number, azIsOutlierForFaultsAlarm: IAlarm, availabilityImpactAlarm: IAlarm, moreThanOneInstanceContributingToFaults: IAlarm, azIsOutlierForLatencyAlarm: IAlarm, latencyImpactAlarm: IAlarm, moreThanOneInstanceContributingToLatency: IAlarm, nameSuffix?: string): IAlarm;
|
|
171
|
+
/**
|
|
172
|
+
* Creates an alarm that fires if either the canary or the
|
|
173
|
+
* server side detect single AZ isolated impact
|
|
174
|
+
* @param scope
|
|
175
|
+
* @param operation
|
|
176
|
+
* @param availabilityZoneId
|
|
177
|
+
* @param counter
|
|
178
|
+
* @param serverSideAlarm
|
|
179
|
+
* @param canaryAlarm
|
|
180
|
+
* @returns
|
|
181
|
+
*/
|
|
182
|
+
static createAggregateIsolatedAZImpactAlarm(scope: Construct, operation: IOperation, availabilityZoneId: string, counter: number, serverSideAlarm: IAlarm, canaryAlarm: IAlarm): IAlarm;
|
|
183
|
+
/**
|
|
184
|
+
* Creates a regional availability alarm for the operation
|
|
185
|
+
* @param scope
|
|
186
|
+
* @param metricDetails
|
|
187
|
+
* @param nameSuffix
|
|
188
|
+
* @param counter
|
|
189
|
+
* @returns
|
|
190
|
+
*/
|
|
191
|
+
static createRegionalAvailabilityAlarm(scope: Construct, metricDetails: IOperationMetricDetails, nameSuffix: string): IAlarm;
|
|
192
|
+
/**
|
|
193
|
+
* Creates a regional latency alarm for the operation
|
|
194
|
+
* @param scope
|
|
195
|
+
* @param metricDetails
|
|
196
|
+
* @param nameSuffix
|
|
197
|
+
* @param counter
|
|
198
|
+
* @returns
|
|
199
|
+
*/
|
|
200
|
+
static createRegionalLatencyAlarm(scope: Construct, metricDetails: IOperationMetricDetails, nameSuffix: string): IAlarm;
|
|
201
|
+
/**
|
|
202
|
+
* A composite alarm combining latency and availability alarms for this operation in the region
|
|
203
|
+
* as measured from either the server side or canary
|
|
204
|
+
* @param scope
|
|
205
|
+
* @param operation
|
|
206
|
+
* @param nameSuffix
|
|
207
|
+
* @param regionalAvailabilityAlarm
|
|
208
|
+
* @param regionalLatencyAlarm
|
|
209
|
+
* @returns
|
|
210
|
+
*/
|
|
211
|
+
static createRegionalCustomerExperienceAlarm(scope: Construct, operationName: string, nameSuffix: string, regionalAvailabilityAlarm: IAlarm, regionalLatencyAlarm: IAlarm): IAlarm;
|
|
212
|
+
static createRegionalInstanceContributorsToHighLatency(scope: Construct, metricDetails: IOperationMetricDetails, ruleDetails: IContributorInsightRuleDetails): CfnInsightRule;
|
|
213
|
+
static createRegionalInstanceContributorsToFaults(scope: Construct, metricDetails: IOperationMetricDetails, ruleDetails: IContributorInsightRuleDetails): CfnInsightRule;
|
|
214
|
+
}
|