@rio-cloud/cdk-v2-constructs 4.33.0 → 4.33.2

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 CHANGED
@@ -3668,7 +3668,7 @@
3668
3668
  },
3669
3669
  "name": "@rio-cloud/cdk-v2-constructs",
3670
3670
  "readme": {
3671
- "markdown": "# RIO CDK Constructs\n\nThis package contains CDK2 constructs for RIO teams.\n\n> NPM: `@rio-cloud/cdk-v2-constructs`\n\n## Bootstrapping of CDK project\n\n```\n$ npx cdk init --language typescript\n```\n\n## Installation\n\n```\n$ npm install --save @rio-cloud/cdk-v2-constructs\n```\n\n## See also\n\n * [How to contribute](./CONTRIBUTION.md)\n * [Changelog](./CHANGELOG.md)\n * [brief API description](./API.md)\n\n## Internal documentation for library devs\n[Documentation](./developers-readme.md)\n\n## FAQ's\n- How can I update the thresholds of monitors created by watchful?\n\n There is an `overrideAlarmThreshold` method which can be used to override the default watchful thresholds. Please make aure to use the method before the `watchscope` function.\n Eg -\n ```\n ...\n const dw = new Watchful(stack, 'Watchful', {});\n dw.overrideAlarmThreshold({\n monitoredResourceScope: lambdaA,\n monitorType: MonitorType.ERRORS,\n threshold: 5,\n });\n dw.watchScope(stack);\n ```"
3671
+ "markdown": "# RIO CDK Constructs\n\nThis package contains CDK2 constructs for RIO teams.\n\n> NPM: `@rio-cloud/cdk-v2-constructs`\n\n## Bootstrapping of CDK project\n\n```\n$ npx cdk init --language typescript\n```\n\n## Installation\n\n```\n$ npm install --save @rio-cloud/cdk-v2-constructs\n```\n\n## See also\n\n * [How to contribute](./CONTRIBUTION.md)\n * [Changelog](./CHANGELOG.md)\n * [brief API description](./API.md)\n\n## Internal documentation for library devs\n[Documentation](./developers-readme.md)\n\n## Constructs overview (Under construction...)\n\n### Watchful\n\nWatchful constructs help generate some default monitors based on the resouces defined in your stack. Eg - If your stack contains a lambda function and you configure watchful construct, then it will create out of box metric monitors for Throttling, Lambda error and Log error monitors. The ever growing list of resources that watchful creates monitors for as of today are:\n\n- Application load balancer\n- Cloudfront\n- Documentdb\n- Dynamodb\n- Fargate\n- Lambda\n- RDS\n\nSimply add the following to your CDK stack to get started.\n```\n import * as rio from '@rio-cloud/cdk-v2-constructs';\n ...\n const dw = new rio.watchfulv2.Watchful(this, 'Watchful', {\n serviceName,\n });\n dw.watchScope(this); // Generates alarms for all supported resources\n ...\n```\n\nThere are options to override some defaults too. Please be aware that the library is very opinionated and is written with the most general use cases in mind. It is necessary to keep the use of the library simple enough, which means that there is only limited flexibility regarding the configuration options. Having said that, feel free to reach out to team CLAID over slack #rio-platform-support in case of feature requests.\n\nThe broad classification of the monitors created by watchful are\n- Log error monitors\n- Metrics Query monitors: Basically everything other than log error monitors\n\nFor Metrics query monitors, you can configure the priority (defaults as 3). For log error monitors, you can cpnfigure priority, renototification interval and can configure if the auto close of the monitor is disabled.\n```\n ...\n const dw = new Watchful(stack, 'Watchful2', {\n logErrorMonitorConfig: {\n disableAutoClose: true,\n renotifyInterval: 150,\n priority: 4,\n },\n queryErrorMonitorConfig: {\n priority: 4\n }\n });\n dw.watchScope(stack);\n```\n\nThere is an `overrideAlarmThreshold` method which can be used to override the default watchful thresholds. Please make aure to use the method before the `watchscope` function.\nEg -\n```\n...\nconst dw = new Watchful(stack, 'Watchful', {});\ndw.overrideAlarmThreshold({\n monitoredResourceScope: lambdaA,\n monitorType: MonitorType.ERRORS,\n threshold: 5,\n});\ndw.watchScope(stack);\n```"
3672
3672
  },
3673
3673
  "repository": {
3674
3674
  "type": "git",
@@ -7474,6 +7474,22 @@
7474
7474
  "fqn": "aws-cdk-lib.aws_cloudwatch.Metric"
7475
7475
  }
7476
7476
  },
7477
+ {
7478
+ "abstract": true,
7479
+ "docs": {
7480
+ "stability": "stable",
7481
+ "summary": "priority."
7482
+ },
7483
+ "immutable": true,
7484
+ "locationInModule": {
7485
+ "filename": "src/watchful/metric-alarm.ts",
7486
+ "line": 38
7487
+ },
7488
+ "name": "priority",
7489
+ "type": {
7490
+ "primitive": "number"
7491
+ }
7492
+ },
7477
7493
  {
7478
7494
  "abstract": true,
7479
7495
  "docs": {
@@ -10963,7 +10979,7 @@
10963
10979
  },
10964
10980
  "locationInModule": {
10965
10981
  "filename": "src/watchful/watchful.ts",
10966
- "line": 317
10982
+ "line": 318
10967
10983
  },
10968
10984
  "name": "createLogAlarm",
10969
10985
  "overrides": "@rio-cloud/cdk-v2-constructs.AbstractWatchful",
@@ -10995,7 +11011,7 @@
10995
11011
  },
10996
11012
  "locationInModule": {
10997
11013
  "filename": "src/watchful/watchful.ts",
10998
- "line": 341
11014
+ "line": 342
10999
11015
  },
11000
11016
  "name": "watchScope",
11001
11017
  "parameters": [
@@ -15450,6 +15466,135 @@
15450
15466
  ],
15451
15467
  "symbolId": "src/kafka/rio-kafka-event-source:RioKafkaEventSourceProps"
15452
15468
  },
15469
+ "@rio-cloud/cdk-v2-constructs.watchfulv2.LogErrorMonitorProps": {
15470
+ "assembly": "@rio-cloud/cdk-v2-constructs",
15471
+ "datatype": true,
15472
+ "docs": {
15473
+ "stability": "stable",
15474
+ "summary": "Log error monitor props."
15475
+ },
15476
+ "fqn": "@rio-cloud/cdk-v2-constructs.watchfulv2.LogErrorMonitorProps",
15477
+ "kind": "interface",
15478
+ "locationInModule": {
15479
+ "filename": "src/watchfulv2/watchful.ts",
15480
+ "line": 11
15481
+ },
15482
+ "name": "LogErrorMonitorProps",
15483
+ "namespace": "watchfulv2",
15484
+ "properties": [
15485
+ {
15486
+ "abstract": true,
15487
+ "docs": {
15488
+ "default": "{@link false }",
15489
+ "remarks": "This property has been deprecated. The propery has been instead nested into logErrorMonitorConfig.\nThe functionality remains unchanged",
15490
+ "stability": "stable",
15491
+ "summary": "Enable error log monitors creating cases in Datadog."
15492
+ },
15493
+ "immutable": true,
15494
+ "locationInModule": {
15495
+ "filename": "src/watchfulv2/watchful.ts",
15496
+ "line": 31
15497
+ },
15498
+ "name": "createCasesFromErrorLogMonitors",
15499
+ "optional": true,
15500
+ "type": {
15501
+ "primitive": "boolean"
15502
+ }
15503
+ },
15504
+ {
15505
+ "abstract": true,
15506
+ "docs": {
15507
+ "default": "false",
15508
+ "remarks": "This option also sets the renotify interval to 2 hours",
15509
+ "stability": "stable",
15510
+ "summary": "Configure if monitor needs to be resolved manually every time."
15511
+ },
15512
+ "immutable": true,
15513
+ "locationInModule": {
15514
+ "filename": "src/watchfulv2/watchful.ts",
15515
+ "line": 16
15516
+ },
15517
+ "name": "disableAutoClose",
15518
+ "optional": true,
15519
+ "type": {
15520
+ "primitive": "boolean"
15521
+ }
15522
+ },
15523
+ {
15524
+ "abstract": true,
15525
+ "docs": {
15526
+ "default": "3",
15527
+ "stability": "stable",
15528
+ "summary": "Set the priority of the log error monitor."
15529
+ },
15530
+ "immutable": true,
15531
+ "locationInModule": {
15532
+ "filename": "src/watchfulv2/watchful.ts",
15533
+ "line": 22
15534
+ },
15535
+ "name": "priority",
15536
+ "optional": true,
15537
+ "type": {
15538
+ "primitive": "number"
15539
+ }
15540
+ },
15541
+ {
15542
+ "abstract": true,
15543
+ "docs": {
15544
+ "stability": "stable",
15545
+ "summary": "Renotification interval for log error monitor in minutes."
15546
+ },
15547
+ "immutable": true,
15548
+ "locationInModule": {
15549
+ "filename": "src/watchfulv2/watchful.ts",
15550
+ "line": 36
15551
+ },
15552
+ "name": "renotifyInterval",
15553
+ "optional": true,
15554
+ "type": {
15555
+ "primitive": "number"
15556
+ }
15557
+ }
15558
+ ],
15559
+ "symbolId": "src/watchfulv2/watchful:LogErrorMonitorProps"
15560
+ },
15561
+ "@rio-cloud/cdk-v2-constructs.watchfulv2.QueryErrorMonitorProps": {
15562
+ "assembly": "@rio-cloud/cdk-v2-constructs",
15563
+ "datatype": true,
15564
+ "docs": {
15565
+ "stability": "stable",
15566
+ "summary": "Query error monitor props."
15567
+ },
15568
+ "fqn": "@rio-cloud/cdk-v2-constructs.watchfulv2.QueryErrorMonitorProps",
15569
+ "kind": "interface",
15570
+ "locationInModule": {
15571
+ "filename": "src/watchfulv2/watchful.ts",
15572
+ "line": 42
15573
+ },
15574
+ "name": "QueryErrorMonitorProps",
15575
+ "namespace": "watchfulv2",
15576
+ "properties": [
15577
+ {
15578
+ "abstract": true,
15579
+ "docs": {
15580
+ "default": "3",
15581
+ "stability": "stable",
15582
+ "summary": "Set the priority of the log error monitor."
15583
+ },
15584
+ "immutable": true,
15585
+ "locationInModule": {
15586
+ "filename": "src/watchfulv2/watchful.ts",
15587
+ "line": 47
15588
+ },
15589
+ "name": "priority",
15590
+ "optional": true,
15591
+ "type": {
15592
+ "primitive": "number"
15593
+ }
15594
+ }
15595
+ ],
15596
+ "symbolId": "src/watchfulv2/watchful:QueryErrorMonitorProps"
15597
+ },
15453
15598
  "@rio-cloud/cdk-v2-constructs.watchfulv2.Watchful": {
15454
15599
  "assembly": "@rio-cloud/cdk-v2-constructs",
15455
15600
  "base": "@rio-cloud/cdk-v2-constructs.AbstractWatchful",
@@ -15465,7 +15610,7 @@
15465
15610
  },
15466
15611
  "locationInModule": {
15467
15612
  "filename": "src/watchfulv2/watchful.ts",
15468
- "line": 51
15613
+ "line": 107
15469
15614
  },
15470
15615
  "parameters": [
15471
15616
  {
@@ -15492,7 +15637,7 @@
15492
15637
  "kind": "class",
15493
15638
  "locationInModule": {
15494
15639
  "filename": "src/watchfulv2/watchful.ts",
15495
- "line": 46
15640
+ "line": 100
15496
15641
  },
15497
15642
  "methods": [
15498
15643
  {
@@ -15502,7 +15647,7 @@
15502
15647
  },
15503
15648
  "locationInModule": {
15504
15649
  "filename": "src/watchfulv2/watchful.ts",
15505
- "line": 64
15650
+ "line": 131
15506
15651
  },
15507
15652
  "name": "createAlarm",
15508
15653
  "overrides": "@rio-cloud/cdk-v2-constructs.AbstractWatchful",
@@ -15537,7 +15682,7 @@
15537
15682
  },
15538
15683
  "locationInModule": {
15539
15684
  "filename": "src/watchfulv2/watchful.ts",
15540
- "line": 83
15685
+ "line": 151
15541
15686
  },
15542
15687
  "name": "createLogAlarm",
15543
15688
  "overrides": "@rio-cloud/cdk-v2-constructs.AbstractWatchful",
@@ -15569,7 +15714,7 @@
15569
15714
  },
15570
15715
  "locationInModule": {
15571
15716
  "filename": "src/watchfulv2/watchful.ts",
15572
- "line": 108
15717
+ "line": 178
15573
15718
  },
15574
15719
  "name": "watchScope",
15575
15720
  "parameters": [
@@ -15597,7 +15742,7 @@
15597
15742
  "kind": "interface",
15598
15743
  "locationInModule": {
15599
15744
  "filename": "src/watchfulv2/watchful.ts",
15600
- "line": 11
15745
+ "line": 53
15601
15746
  },
15602
15747
  "name": "WatchfulProps",
15603
15748
  "namespace": "watchfulv2",
@@ -15606,13 +15751,14 @@
15606
15751
  "abstract": true,
15607
15752
  "docs": {
15608
15753
  "default": "{@link false }",
15609
- "stability": "stable",
15754
+ "deprecated": "This property has been deprecated. The propery has been instead nested into logErrorMonitorConfig. The functionality remains unchanged.",
15755
+ "stability": "deprecated",
15610
15756
  "summary": "Enable error log monitors creating cases in Datadog."
15611
15757
  },
15612
15758
  "immutable": true,
15613
15759
  "locationInModule": {
15614
15760
  "filename": "src/watchfulv2/watchful.ts",
15615
- "line": 31
15761
+ "line": 74
15616
15762
  },
15617
15763
  "name": "createCasesFromErrorLogMonitors",
15618
15764
  "optional": true,
@@ -15620,6 +15766,23 @@
15620
15766
  "primitive": "boolean"
15621
15767
  }
15622
15768
  },
15769
+ {
15770
+ "abstract": true,
15771
+ "docs": {
15772
+ "stability": "stable",
15773
+ "summary": "Configure log error monitor properties."
15774
+ },
15775
+ "immutable": true,
15776
+ "locationInModule": {
15777
+ "filename": "src/watchfulv2/watchful.ts",
15778
+ "line": 79
15779
+ },
15780
+ "name": "logErrorMonitorConfig",
15781
+ "optional": true,
15782
+ "type": {
15783
+ "fqn": "@rio-cloud/cdk-v2-constructs.watchfulv2.LogErrorMonitorProps"
15784
+ }
15785
+ },
15623
15786
  {
15624
15787
  "abstract": true,
15625
15788
  "docs": {
@@ -15630,7 +15793,7 @@
15630
15793
  "immutable": true,
15631
15794
  "locationInModule": {
15632
15795
  "filename": "src/watchfulv2/watchful.ts",
15633
- "line": 24
15796
+ "line": 66
15634
15797
  },
15635
15798
  "name": "notification",
15636
15799
  "optional": true,
@@ -15638,6 +15801,24 @@
15638
15801
  "fqn": "@rio-cloud/cdk-v2-constructs.datadogv2.INotification"
15639
15802
  }
15640
15803
  },
15804
+ {
15805
+ "abstract": true,
15806
+ "docs": {
15807
+ "remarks": "All monitors created by watchful except for Log error monitor.\nConfigure property *logErrorMonitor* for Log error monitor.",
15808
+ "stability": "stable",
15809
+ "summary": "Configure query alert monitors."
15810
+ },
15811
+ "immutable": true,
15812
+ "locationInModule": {
15813
+ "filename": "src/watchfulv2/watchful.ts",
15814
+ "line": 85
15815
+ },
15816
+ "name": "queryErrorMonitorConfig",
15817
+ "optional": true,
15818
+ "type": {
15819
+ "fqn": "@rio-cloud/cdk-v2-constructs.watchfulv2.QueryErrorMonitorProps"
15820
+ }
15821
+ },
15641
15822
  {
15642
15823
  "abstract": true,
15643
15824
  "docs": {
@@ -15648,7 +15829,7 @@
15648
15829
  "immutable": true,
15649
15830
  "locationInModule": {
15650
15831
  "filename": "src/watchfulv2/watchful.ts",
15651
- "line": 17
15832
+ "line": 59
15652
15833
  },
15653
15834
  "name": "serviceName",
15654
15835
  "optional": true,
@@ -15661,5 +15842,5 @@
15661
15842
  }
15662
15843
  },
15663
15844
  "version": "0.0.0",
15664
- "fingerprint": "x/mTlwg21suih9TKv6Gaich+3UlQM+14pu4VqnR83KM="
15845
+ "fingerprint": "70LvXJLOYza4edFMgTMby4XdszbhVdPZbcsTqf4VOOE="
15665
15846
  }
package/API.md CHANGED
@@ -8002,6 +8002,7 @@ const dataDogMetricAlarmProps: DataDogMetricAlarmProps = { ... }
8002
8002
  | <code><a href="#@rio-cloud/cdk-v2-constructs.DataDogMetricAlarmProps.property.comparisonOperator">comparisonOperator</a></code> | <code>aws-cdk-lib.aws_cloudwatch.ComparisonOperator</code> | Comparison to use to check if metric is breaching. |
8003
8003
  | <code><a href="#@rio-cloud/cdk-v2-constructs.DataDogMetricAlarmProps.property.evaluationPeriods">evaluationPeriods</a></code> | <code>number</code> | The number of periods over which data is compared to the specified threshold. |
8004
8004
  | <code><a href="#@rio-cloud/cdk-v2-constructs.DataDogMetricAlarmProps.property.metric">metric</a></code> | <code>aws-cdk-lib.aws_cloudwatch.Metric</code> | The CloudWatch metric used as source for the alarm. |
8005
+ | <code><a href="#@rio-cloud/cdk-v2-constructs.DataDogMetricAlarmProps.property.priority">priority</a></code> | <code>number</code> | priority. |
8005
8006
  | <code><a href="#@rio-cloud/cdk-v2-constructs.DataDogMetricAlarmProps.property.threshold">threshold</a></code> | <code>number</code> | The value against which the specified statistic is compared. |
8006
8007
  | <code><a href="#@rio-cloud/cdk-v2-constructs.DataDogMetricAlarmProps.property.treatMissingData">treatMissingData</a></code> | <code>aws-cdk-lib.aws_cloudwatch.TreatMissingData</code> | Sets how this alarm is to handle missing data points. |
8007
8008
  | <code><a href="#@rio-cloud/cdk-v2-constructs.DataDogMetricAlarmProps.property.dataDogOpsGenieIntegrationName">dataDogOpsGenieIntegrationName</a></code> | <code>string</code> | The name of DataDog's OpsGenie integration. |
@@ -8059,6 +8060,18 @@ The CloudWatch metric used as source for the alarm.
8059
8060
 
8060
8061
  ---
8061
8062
 
8063
+ ##### `priority`<sup>Required</sup> <a name="priority" id="@rio-cloud/cdk-v2-constructs.DataDogMetricAlarmProps.property.priority"></a>
8064
+
8065
+ ```typescript
8066
+ public readonly priority: number;
8067
+ ```
8068
+
8069
+ - *Type:* number
8070
+
8071
+ priority.
8072
+
8073
+ ---
8074
+
8062
8075
  ##### `threshold`<sup>Required</sup> <a name="threshold" id="@rio-cloud/cdk-v2-constructs.DataDogMetricAlarmProps.property.threshold"></a>
8063
8076
 
8064
8077
  ```typescript
@@ -10349,6 +10362,85 @@ The soft limit is 10 days but can be increased upon requests.
10349
10362
 
10350
10363
  ---
10351
10364
 
10365
+ ### LogErrorMonitorProps <a name="LogErrorMonitorProps" id="@rio-cloud/cdk-v2-constructs.watchfulv2.LogErrorMonitorProps"></a>
10366
+
10367
+ Log error monitor props.
10368
+
10369
+ #### Initializer <a name="Initializer" id="@rio-cloud/cdk-v2-constructs.watchfulv2.LogErrorMonitorProps.Initializer"></a>
10370
+
10371
+ ```typescript
10372
+ import { watchfulv2 } from '@rio-cloud/cdk-v2-constructs'
10373
+
10374
+ const logErrorMonitorProps: watchfulv2.LogErrorMonitorProps = { ... }
10375
+ ```
10376
+
10377
+ #### Properties <a name="Properties" id="Properties"></a>
10378
+
10379
+ | **Name** | **Type** | **Description** |
10380
+ | --- | --- | --- |
10381
+ | <code><a href="#@rio-cloud/cdk-v2-constructs.watchfulv2.LogErrorMonitorProps.property.createCasesFromErrorLogMonitors">createCasesFromErrorLogMonitors</a></code> | <code>boolean</code> | Enable error log monitors creating cases in Datadog. |
10382
+ | <code><a href="#@rio-cloud/cdk-v2-constructs.watchfulv2.LogErrorMonitorProps.property.disableAutoClose">disableAutoClose</a></code> | <code>boolean</code> | Configure if monitor needs to be resolved manually every time. |
10383
+ | <code><a href="#@rio-cloud/cdk-v2-constructs.watchfulv2.LogErrorMonitorProps.property.priority">priority</a></code> | <code>number</code> | Set the priority of the log error monitor. |
10384
+ | <code><a href="#@rio-cloud/cdk-v2-constructs.watchfulv2.LogErrorMonitorProps.property.renotifyInterval">renotifyInterval</a></code> | <code>number</code> | Renotification interval for log error monitor in minutes. |
10385
+
10386
+ ---
10387
+
10388
+ ##### `createCasesFromErrorLogMonitors`<sup>Optional</sup> <a name="createCasesFromErrorLogMonitors" id="@rio-cloud/cdk-v2-constructs.watchfulv2.LogErrorMonitorProps.property.createCasesFromErrorLogMonitors"></a>
10389
+
10390
+ ```typescript
10391
+ public readonly createCasesFromErrorLogMonitors: boolean;
10392
+ ```
10393
+
10394
+ - *Type:* boolean
10395
+ - *Default:* {@link false }
10396
+
10397
+ Enable error log monitors creating cases in Datadog.
10398
+
10399
+ This property has been deprecated. The propery has been instead nested into logErrorMonitorConfig.
10400
+ The functionality remains unchanged
10401
+
10402
+ ---
10403
+
10404
+ ##### `disableAutoClose`<sup>Optional</sup> <a name="disableAutoClose" id="@rio-cloud/cdk-v2-constructs.watchfulv2.LogErrorMonitorProps.property.disableAutoClose"></a>
10405
+
10406
+ ```typescript
10407
+ public readonly disableAutoClose: boolean;
10408
+ ```
10409
+
10410
+ - *Type:* boolean
10411
+ - *Default:* false
10412
+
10413
+ Configure if monitor needs to be resolved manually every time.
10414
+
10415
+ This option also sets the renotify interval to 2 hours
10416
+
10417
+ ---
10418
+
10419
+ ##### `priority`<sup>Optional</sup> <a name="priority" id="@rio-cloud/cdk-v2-constructs.watchfulv2.LogErrorMonitorProps.property.priority"></a>
10420
+
10421
+ ```typescript
10422
+ public readonly priority: number;
10423
+ ```
10424
+
10425
+ - *Type:* number
10426
+ - *Default:* 3
10427
+
10428
+ Set the priority of the log error monitor.
10429
+
10430
+ ---
10431
+
10432
+ ##### `renotifyInterval`<sup>Optional</sup> <a name="renotifyInterval" id="@rio-cloud/cdk-v2-constructs.watchfulv2.LogErrorMonitorProps.property.renotifyInterval"></a>
10433
+
10434
+ ```typescript
10435
+ public readonly renotifyInterval: number;
10436
+ ```
10437
+
10438
+ - *Type:* number
10439
+
10440
+ Renotification interval for log error monitor in minutes.
10441
+
10442
+ ---
10443
+
10352
10444
  ### MetricAlarmProps <a name="MetricAlarmProps" id="@rio-cloud/cdk-v2-constructs.MetricAlarmProps"></a>
10353
10445
 
10354
10446
  An interface to define a generic alarm that can be used in DataDog as well as in CloudWatch.
@@ -10369,6 +10461,7 @@ const metricAlarmProps: MetricAlarmProps = { ... }
10369
10461
  | <code><a href="#@rio-cloud/cdk-v2-constructs.MetricAlarmProps.property.comparisonOperator">comparisonOperator</a></code> | <code>aws-cdk-lib.aws_cloudwatch.ComparisonOperator</code> | Comparison to use to check if metric is breaching. |
10370
10462
  | <code><a href="#@rio-cloud/cdk-v2-constructs.MetricAlarmProps.property.evaluationPeriods">evaluationPeriods</a></code> | <code>number</code> | The number of periods over which data is compared to the specified threshold. |
10371
10463
  | <code><a href="#@rio-cloud/cdk-v2-constructs.MetricAlarmProps.property.metric">metric</a></code> | <code>aws-cdk-lib.aws_cloudwatch.Metric</code> | The CloudWatch metric used as source for the alarm. |
10464
+ | <code><a href="#@rio-cloud/cdk-v2-constructs.MetricAlarmProps.property.priority">priority</a></code> | <code>number</code> | priority. |
10372
10465
  | <code><a href="#@rio-cloud/cdk-v2-constructs.MetricAlarmProps.property.threshold">threshold</a></code> | <code>number</code> | The value against which the specified statistic is compared. |
10373
10466
  | <code><a href="#@rio-cloud/cdk-v2-constructs.MetricAlarmProps.property.treatMissingData">treatMissingData</a></code> | <code>aws-cdk-lib.aws_cloudwatch.TreatMissingData</code> | Sets how this alarm is to handle missing data points. |
10374
10467
 
@@ -10423,6 +10516,18 @@ The CloudWatch metric used as source for the alarm.
10423
10516
 
10424
10517
  ---
10425
10518
 
10519
+ ##### `priority`<sup>Required</sup> <a name="priority" id="@rio-cloud/cdk-v2-constructs.MetricAlarmProps.property.priority"></a>
10520
+
10521
+ ```typescript
10522
+ public readonly priority: number;
10523
+ ```
10524
+
10525
+ - *Type:* number
10526
+
10527
+ priority.
10528
+
10529
+ ---
10530
+
10426
10531
  ##### `threshold`<sup>Required</sup> <a name="threshold" id="@rio-cloud/cdk-v2-constructs.MetricAlarmProps.property.threshold"></a>
10427
10532
 
10428
10533
  ```typescript
@@ -10980,6 +11085,39 @@ public readonly secretsFilePath: string;
10980
11085
 
10981
11086
  ---
10982
11087
 
11088
+ ### QueryErrorMonitorProps <a name="QueryErrorMonitorProps" id="@rio-cloud/cdk-v2-constructs.watchfulv2.QueryErrorMonitorProps"></a>
11089
+
11090
+ Query error monitor props.
11091
+
11092
+ #### Initializer <a name="Initializer" id="@rio-cloud/cdk-v2-constructs.watchfulv2.QueryErrorMonitorProps.Initializer"></a>
11093
+
11094
+ ```typescript
11095
+ import { watchfulv2 } from '@rio-cloud/cdk-v2-constructs'
11096
+
11097
+ const queryErrorMonitorProps: watchfulv2.QueryErrorMonitorProps = { ... }
11098
+ ```
11099
+
11100
+ #### Properties <a name="Properties" id="Properties"></a>
11101
+
11102
+ | **Name** | **Type** | **Description** |
11103
+ | --- | --- | --- |
11104
+ | <code><a href="#@rio-cloud/cdk-v2-constructs.watchfulv2.QueryErrorMonitorProps.property.priority">priority</a></code> | <code>number</code> | Set the priority of the log error monitor. |
11105
+
11106
+ ---
11107
+
11108
+ ##### `priority`<sup>Optional</sup> <a name="priority" id="@rio-cloud/cdk-v2-constructs.watchfulv2.QueryErrorMonitorProps.property.priority"></a>
11109
+
11110
+ ```typescript
11111
+ public readonly priority: number;
11112
+ ```
11113
+
11114
+ - *Type:* number
11115
+ - *Default:* 3
11116
+
11117
+ Set the priority of the log error monitor.
11118
+
11119
+ ---
11120
+
10983
11121
  ### RioBitBucketSourceActionProps <a name="RioBitBucketSourceActionProps" id="@rio-cloud/cdk-v2-constructs.RioBitBucketSourceActionProps"></a>
10984
11122
 
10985
11123
  #### Initializer <a name="Initializer" id="@rio-cloud/cdk-v2-constructs.RioBitBucketSourceActionProps.Initializer"></a>
@@ -13016,12 +13154,16 @@ const watchfulProps: watchfulv2.WatchfulProps = { ... }
13016
13154
  | **Name** | **Type** | **Description** |
13017
13155
  | --- | --- | --- |
13018
13156
  | <code><a href="#@rio-cloud/cdk-v2-constructs.watchfulv2.WatchfulProps.property.createCasesFromErrorLogMonitors">createCasesFromErrorLogMonitors</a></code> | <code>boolean</code> | Enable error log monitors creating cases in Datadog. |
13157
+ | <code><a href="#@rio-cloud/cdk-v2-constructs.watchfulv2.WatchfulProps.property.logErrorMonitorConfig">logErrorMonitorConfig</a></code> | <code>@rio-cloud/cdk-v2-constructs.watchfulv2.LogErrorMonitorProps</code> | Configure log error monitor properties. |
13019
13158
  | <code><a href="#@rio-cloud/cdk-v2-constructs.watchfulv2.WatchfulProps.property.notification">notification</a></code> | <code>@rio-cloud/cdk-v2-constructs.datadogv2.INotification</code> | Set the way how monitors should notify in case of an alert. |
13159
+ | <code><a href="#@rio-cloud/cdk-v2-constructs.watchfulv2.WatchfulProps.property.queryErrorMonitorConfig">queryErrorMonitorConfig</a></code> | <code>@rio-cloud/cdk-v2-constructs.watchfulv2.QueryErrorMonitorProps</code> | Configure query alert monitors. |
13020
13160
  | <code><a href="#@rio-cloud/cdk-v2-constructs.watchfulv2.WatchfulProps.property.serviceName">serviceName</a></code> | <code>string</code> | The service name. |
13021
13161
 
13022
13162
  ---
13023
13163
 
13024
- ##### `createCasesFromErrorLogMonitors`<sup>Optional</sup> <a name="createCasesFromErrorLogMonitors" id="@rio-cloud/cdk-v2-constructs.watchfulv2.WatchfulProps.property.createCasesFromErrorLogMonitors"></a>
13164
+ ##### ~~`createCasesFromErrorLogMonitors`~~<sup>Optional</sup> <a name="createCasesFromErrorLogMonitors" id="@rio-cloud/cdk-v2-constructs.watchfulv2.WatchfulProps.property.createCasesFromErrorLogMonitors"></a>
13165
+
13166
+ - *Deprecated:* This property has been deprecated. The propery has been instead nested into logErrorMonitorConfig. The functionality remains unchanged.
13025
13167
 
13026
13168
  ```typescript
13027
13169
  public readonly createCasesFromErrorLogMonitors: boolean;
@@ -13034,6 +13176,18 @@ Enable error log monitors creating cases in Datadog.
13034
13176
 
13035
13177
  ---
13036
13178
 
13179
+ ##### `logErrorMonitorConfig`<sup>Optional</sup> <a name="logErrorMonitorConfig" id="@rio-cloud/cdk-v2-constructs.watchfulv2.WatchfulProps.property.logErrorMonitorConfig"></a>
13180
+
13181
+ ```typescript
13182
+ public readonly logErrorMonitorConfig: LogErrorMonitorProps;
13183
+ ```
13184
+
13185
+ - *Type:* @rio-cloud/cdk-v2-constructs.watchfulv2.LogErrorMonitorProps
13186
+
13187
+ Configure log error monitor properties.
13188
+
13189
+ ---
13190
+
13037
13191
  ##### `notification`<sup>Optional</sup> <a name="notification" id="@rio-cloud/cdk-v2-constructs.watchfulv2.WatchfulProps.property.notification"></a>
13038
13192
 
13039
13193
  ```typescript
@@ -13047,6 +13201,21 @@ Set the way how monitors should notify in case of an alert.
13047
13201
 
13048
13202
  ---
13049
13203
 
13204
+ ##### `queryErrorMonitorConfig`<sup>Optional</sup> <a name="queryErrorMonitorConfig" id="@rio-cloud/cdk-v2-constructs.watchfulv2.WatchfulProps.property.queryErrorMonitorConfig"></a>
13205
+
13206
+ ```typescript
13207
+ public readonly queryErrorMonitorConfig: QueryErrorMonitorProps;
13208
+ ```
13209
+
13210
+ - *Type:* @rio-cloud/cdk-v2-constructs.watchfulv2.QueryErrorMonitorProps
13211
+
13212
+ Configure query alert monitors.
13213
+
13214
+ All monitors created by watchful except for Log error monitor.
13215
+ Configure property *logErrorMonitor* for Log error monitor.
13216
+
13217
+ ---
13218
+
13050
13219
  ##### `serviceName`<sup>Optional</sup> <a name="serviceName" id="@rio-cloud/cdk-v2-constructs.watchfulv2.WatchfulProps.property.serviceName"></a>
13051
13220
 
13052
13221
  ```typescript
package/CHANGELOG.md CHANGED
@@ -2,6 +2,15 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines.
4
4
 
5
+ ## [4.33.2](https://bitbucket.collaboration-man.com/projects/RIODEV/repos/cdk-v2-constructs/compare/commits?targetBranch=refs%2Ftags%2Fv4.33.1&sourceBranch=refs%2Ftags%2Fv4.33.2) (2024-04-25)
6
+
7
+ ## [4.33.1](https://bitbucket.collaboration-man.com/projects/RIODEV/repos/cdk-v2-constructs/compare/commits?targetBranch=refs%2Ftags%2Fv4.33.0&sourceBranch=refs%2Ftags%2Fv4.33.1) (2024-04-24)
8
+
9
+
10
+ ### Bug Fixes
11
+
12
+ * :boom: * The default threshold for watchful v2 alatams has been changed. Priotiy override and disabling of auto close of error monitor has also been added. ([eda81da](https://bitbucket.collaboration-man.com/projects/RIODEV/repos/cdk-v2-constructs/commits/eda81da35a70f78e0bc6b34fda0c0e9ccaaff072))
13
+
5
14
  ## [4.33.0](https://bitbucket.collaboration-man.com/projects/RIODEV/repos/cdk-v2-constructs/compare/commits?targetBranch=refs%2Ftags%2Fv4.32.0&sourceBranch=refs%2Ftags%2Fv4.33.0) (2024-04-17)
6
15
 
7
16
 
package/README.md CHANGED
@@ -25,18 +25,62 @@ $ npm install --save @rio-cloud/cdk-v2-constructs
25
25
  ## Internal documentation for library devs
26
26
  [Documentation](./developers-readme.md)
27
27
 
28
- ## FAQ's
29
- - How can I update the thresholds of monitors created by watchful?
30
-
31
- There is an `overrideAlarmThreshold` method which can be used to override the default watchful thresholds. Please make aure to use the method before the `watchscope` function.
32
- Eg -
33
- ```
28
+ ## Constructs overview (Under construction...)
29
+
30
+ ### Watchful
31
+
32
+ Watchful constructs help generate some default monitors based on the resouces defined in your stack. Eg - If your stack contains a lambda function and you configure watchful construct, then it will create out of box metric monitors for Throttling, Lambda error and Log error monitors. The ever growing list of resources that watchful creates monitors for as of today are:
33
+
34
+ - Application load balancer
35
+ - Cloudfront
36
+ - Documentdb
37
+ - Dynamodb
38
+ - Fargate
39
+ - Lambda
40
+ - RDS
41
+
42
+ Simply add the following to your CDK stack to get started.
43
+ ```
44
+ import * as rio from '@rio-cloud/cdk-v2-constructs';
45
+ ...
46
+ const dw = new rio.watchfulv2.Watchful(this, 'Watchful', {
47
+ serviceName,
48
+ });
49
+ dw.watchScope(this); // Generates alarms for all supported resources
50
+ ...
51
+ ```
52
+
53
+ There are options to override some defaults too. Please be aware that the library is very opinionated and is written with the most general use cases in mind. It is necessary to keep the use of the library simple enough, which means that there is only limited flexibility regarding the configuration options. Having said that, feel free to reach out to team CLAID over slack #rio-platform-support in case of feature requests.
54
+
55
+ The broad classification of the monitors created by watchful are
56
+ - Log error monitors
57
+ - Metrics Query monitors: Basically everything other than log error monitors
58
+
59
+ For Metrics query monitors, you can configure the priority (defaults as 3). For log error monitors, you can cpnfigure priority, renototification interval and can configure if the auto close of the monitor is disabled.
60
+ ```
34
61
  ...
35
- const dw = new Watchful(stack, 'Watchful', {});
36
- dw.overrideAlarmThreshold({
37
- monitoredResourceScope: lambdaA,
38
- monitorType: MonitorType.ERRORS,
39
- threshold: 5,
62
+ const dw = new Watchful(stack, 'Watchful2', {
63
+ logErrorMonitorConfig: {
64
+ disableAutoClose: true,
65
+ renotifyInterval: 150,
66
+ priority: 4,
67
+ },
68
+ queryErrorMonitorConfig: {
69
+ priority: 4
70
+ }
40
71
  });
41
72
  dw.watchScope(stack);
42
- ```
73
+ ```
74
+
75
+ There is an `overrideAlarmThreshold` method which can be used to override the default watchful thresholds. Please make aure to use the method before the `watchscope` function.
76
+ Eg -
77
+ ```
78
+ ...
79
+ const dw = new Watchful(stack, 'Watchful', {});
80
+ dw.overrideAlarmThreshold({
81
+ monitoredResourceScope: lambdaA,
82
+ monitorType: MonitorType.ERRORS,
83
+ threshold: 5,
84
+ });
85
+ dw.watchScope(stack);
86
+ ```