@hiiretail/gcp-infra-cli 0.100.0 → 0.102.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.
@@ -303,14 +303,16 @@ pub_sub:
303
303
  metric.type="pubsub.googleapis.com/subscription/dead_letter_message_count"
304
304
  resource.labels.project_id="<%-projectId%>"
305
305
  threshold_value: 0
306
- duration: 60s
306
+ duration: 300s
307
307
  aggregations:
308
308
  - alignment_period: 60s
309
- per_series_aligner: ALIGN_COUNT
309
+ per_series_aligner: ALIGN_RATE
310
+ cross_series_reducer: REDUCE_SUM
310
311
  group_by_fields:
311
312
  - resource.label.subscription_id
313
+ - metric.label.response_code
312
314
  documentation:
313
- subject: 'Subscription: `$${resource.label.subscription_id}`'
315
+ subject: 'Subscription: `$${resource.label.subscription_id}`, Response code: `$${metric.label.response_code}`'
314
316
  latency:
315
317
  display_name: "[P3] <%-clan%> - Pub/Sub | Response latency distribution"
316
318
  conditions:
@@ -428,19 +430,21 @@ cloud_function:
428
430
  subject: 'Function: `$${resource.label.function_name}`'
429
431
  cloud_run:
430
432
  error_count:
431
- display_name: "[P3] <%-clan%> - Cloud Run | Error Count"
433
+ display_name: "[P3] <%-clan%> - Cloud Run | Error rate"
432
434
  conditions:
433
- - display_name: Cloud Run - Error Count
435
+ - display_name: Error rate above threshold for more than 5 minutes
434
436
  condition_threshold:
435
437
  filter: |
436
438
  resource.type="cloud_run_revision"
437
439
  metric.type="run.googleapis.com/request_count"
438
440
  metric.label.response_code_class="5xx"
439
441
  resource.labels.project_id="<%-projectId%>"
440
- threshold_value: 50
442
+ threshold_value: 0.05
443
+ duration: 300s
441
444
  aggregations:
442
445
  - alignment_period: 60s
443
- per_series_aligner: ALIGN_SUM
446
+ per_series_aligner: ALIGN_RATE
447
+ cross_series_reducer: REDUCE_SUM
444
448
  group_by_fields:
445
449
  - resource.label.service_name
446
450
  documentation:
@@ -448,16 +452,18 @@ cloud_run:
448
452
  request_latency:
449
453
  display_name: "[P3] <%-clan%> - Cloud Run | Request Latency"
450
454
  conditions:
451
- - display_name: Cloud Run - Request Latency
455
+ - display_name: Request latency (p95) above threshold for more than 5 minutes
452
456
  condition_threshold:
453
457
  filter: |
454
458
  resource.type="cloud_run_revision"
455
459
  metric.type="run.googleapis.com/request_latencies"
456
460
  resource.labels.project_id="<%-projectId%>"
457
- threshold_value: 1000
461
+ threshold_value: 500
462
+ duration: 300s
458
463
  aggregations:
459
464
  - alignment_period: 60s
460
- per_series_aligner: ALIGN_PERCENTILE_95
465
+ per_series_aligner: ALIGN_DELTA
466
+ cross_series_reducer: REDUCE_PERCENTILE_95
461
467
  group_by_fields:
462
468
  - resource.label.service_name
463
469
  documentation:
@@ -465,7 +471,7 @@ cloud_run:
465
471
  cpu_utilization:
466
472
  display_name: "[P3] <%-clan%> - Cloud Run | CPU Utilization"
467
473
  conditions:
468
- - display_name: Cloud Run - CPU Utilization
474
+ - display_name: CPU utilization above threshold for more than 5 minutes
469
475
  condition_threshold:
470
476
  filter: |
471
477
  resource.type="cloud_run_revision"
@@ -475,7 +481,8 @@ cloud_run:
475
481
  duration: 300s
476
482
  aggregations:
477
483
  - alignment_period: 60s
478
- per_series_aligner: ALIGN_PERCENTILE_99
484
+ per_series_aligner: ALIGN_SUM
485
+ cross_series_reducer: REDUCE_PERCENTILE_99
479
486
  group_by_fields:
480
487
  - resource.label.service_name
481
488
  documentation:
@@ -483,7 +490,7 @@ cloud_run:
483
490
  memory_utilization:
484
491
  display_name: "[P3] <%-clan%> - Cloud Run | Memory Utilization"
485
492
  conditions:
486
- - display_name: Cloud Run - Memory Utilization
493
+ - display_name: Memory utilization above threshold for more than 5 minutes
487
494
  condition_threshold:
488
495
  filter: |
489
496
  resource.type="cloud_run_revision"
@@ -493,7 +500,8 @@ cloud_run:
493
500
  duration: 300s
494
501
  aggregations:
495
502
  - alignment_period: 60s
496
- per_series_aligner: ALIGN_PERCENTILE_99
503
+ per_series_aligner: ALIGN_SUM
504
+ cross_series_reducer: REDUCE_PERCENTILE_99
497
505
  group_by_fields:
498
506
  - resource.label.service_name
499
507
  documentation:
@@ -507,67 +515,73 @@ cloud_run:
507
515
  resource.type="cloud_run_revision"
508
516
  metric.type="run.googleapis.com/container/startup_latencies"
509
517
  resource.labels.project_id="<%-projectId%>"
510
- threshold_value: 1000
518
+ threshold_value: 2000
511
519
  duration: 300s
512
520
  aggregations:
513
521
  - alignment_period: 60s
514
- per_series_aligner: ALIGN_PERCENTILE_95
522
+ per_series_aligner: ALIGN_DELTA
523
+ cross_series_reducer: REDUCE_PERCENTILE_99
515
524
  group_by_fields:
516
525
  - resource.label.service_name
517
526
  documentation:
518
527
  subject: 'Service: `$${resource.label.service_name}`'
519
528
  spanner:
520
529
  cpu_utilization_by_priority:
521
- display_name: "[P1] <%-clan%> - Spanner | CPU Utilization by Priority"
530
+ display_name: "[P2] <%-clan%> - Spanner | CPU Utilization"
522
531
  conditions:
523
- - display_name: Spanner - CPU Utilization by Priority
532
+ - display_name: Cloud Spanner Database - CPU Utilization
524
533
  condition_threshold:
525
534
  filter: |
526
- resource.type="spanner_instance"
527
- metric.type="spanner.googleapis.com/instance/cpu/utilization_by_priority"
535
+ resource.type = "spanner_instance"
536
+ metric.type = "spanner.googleapis.com/instance/cpu/utilization"
528
537
  resource.labels.project_id="<%-projectId%>"
529
- threshold_value: 0.9
538
+ threshold_Value: 0.8
530
539
  duration: 300s
531
540
  aggregations:
532
541
  - alignment_period: 60s
542
+ cross_series_reducer: REDUCE_MEAN
533
543
  per_series_aligner: ALIGN_MEAN
534
544
  group_by_fields:
535
- - resource.label.instance_id
545
+ - metric.label.database
536
546
  documentation:
537
- subject: 'Instance: `$${resource.label.instance_id}`'
538
- api_request_count:
539
- display_name: "[P2] <%-clan%> - Spanner | API Request Count"
547
+ subject: 'Instance: `$${resource.label.instance_id}`, Database: `$${resource.label.database}`'
548
+ api_request_error_rate:
549
+ display_name: "[P2] <%-clan%> - Spanner | API request error rate"
540
550
  conditions:
541
- - display_name: Spanner - API Request Count
551
+ - display_name: Cloud Spanner Database - API request error rate
542
552
  condition_threshold:
543
553
  filter: |
544
- resource.type="spanner_instance"
545
- metric.type="spanner.googleapis.com/api/api_request_count"
546
- resource.labels.project_id="<%-projectId%>"
547
- threshold_value: 1000
554
+ resource.type = "spanner_instance"
555
+ metric.type = "spanner.googleapis.com/api/api_request_count"
556
+ metric.labels.status != "OK"
557
+ threshold_value: 1
548
558
  duration: 300s
549
559
  aggregations:
550
560
  - alignment_period: 60s
551
- per_series_aligner: ALIGN_SUM
561
+ cross_series_reducer: REDUCE_MEAN
562
+ per_series_aligner: ALIGN_RATE
552
563
  group_by_fields:
553
- - resource.label.instance_id
564
+ - metric.label.status
565
+ - resource.label.database
554
566
  documentation:
555
- subject: 'Instance: `$${resource.label.instance_id}`'
567
+ subject: 'Instance: `$${resource.label.instance_id}`, Database: `$${resource.label.database}}`'
556
568
  request_latencies:
557
- display_name: "[P3] <%-clan%> - Spanner | Request Latencies"
569
+ display_name: '[P3] <%-clan%> - Spanner | API transaction latency'
558
570
  conditions:
559
- - display_name: Spanner - Request Latencies
571
+ - display_name: Cloud Spanner Instance - Request latencies by transaction type
560
572
  condition_threshold:
561
573
  filter: |
562
- resource.type="spanner_instance"
563
- metric.type="spanner.googleapis.com/api/request_latencies"
564
- resource.labels.project_id="<%-projectId%>"
565
- threshold_value: 500
574
+ resource.type = "spanner_instance"
575
+ metric.type = "spanner.googleapis.com/api/request_latencies_by_transaction_type"
576
+ metric.labels.transaction_type = "READ_WRITE"
566
577
  duration: 300s
578
+ threshold_value: 100
567
579
  aggregations:
568
580
  - alignment_period: 60s
569
- per_series_aligner: ALIGN_MEAN
581
+ cross_series_reducer: REDUCE_PERCENTILE_95
570
582
  group_by_fields:
571
- - resource.label.instance_id
583
+ - metric.label.database
584
+ - metric.label.transaction_type
585
+ per_series_aligner: ALIGN_PERCENTILE_95
572
586
  documentation:
573
- subject: 'Instance: `$${resource.label.instance_id}`'
587
+ subject: 'Instance: `$${resource.label.instance_id}`, Database: `$${resource.label.database}}`'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hiiretail/gcp-infra-cli",
3
- "version": "0.100.0",
3
+ "version": "0.102.0",
4
4
  "description": "Infrastructure as code generator for GCP.",
5
5
  "main": "src/cli.js",
6
6
  "bin": {