Skip to content

Commit

Permalink
Merge pull request #83 from dasmeta/DMVP-4392-fill-lambda-metrics-with-0
Browse files Browse the repository at this point in the history
fix(DMVP-4392): Upgraded monitoring module version for cloudwatch
  • Loading branch information
viktoryathegreat authored Jun 18, 2024
2 parents 89325ac + dbc1f0a commit a2c3fc2
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ No requirements.

| Name | Source | Version |
|------|--------|---------|
| <a name="module_alerts"></a> [alerts](#module\_alerts) | dasmeta/monitoring/aws//modules/alerts | 1.3.4 |
| <a name="module_alerts"></a> [alerts](#module\_alerts) | dasmeta/monitoring/aws//modules/alerts | 1.18.1 |
| <a name="module_lambda"></a> [lambda](#module\_lambda) | terraform-aws-modules/lambda/aws | 4.7.1 |
| <a name="module_subscription"></a> [subscription](#module\_subscription) | dasmeta/sns/aws//modules//subscription | 1.2.3 |

Expand All @@ -37,7 +37,7 @@ No requirements.
| <a name="input_dead_letter_queue_arn"></a> [dead\_letter\_queue\_arn](#input\_dead\_letter\_queue\_arn) | The SQS queue arn for using as dead letter | `string` | `null` | no |
| <a name="input_environment_variables"></a> [environment\_variables](#input\_environment\_variables) | Environment variables to pass to function | `map(any)` | `{}` | no |
| <a name="input_fallback_sns_topic_name"></a> [fallback\_sns\_topic\_name](#input\_fallback\_sns\_topic\_name) | The fallback sns topic name to attach/create subscription | `string` | n/a | yes |
| <a name="input_lambda_failed_alert"></a> [lambda\_failed\_alert](#input\_lambda\_failed\_alert) | Alert for lambda failed | `any` | <pre>{<br> "equation": "gte",<br> "period": 60,<br> "statistic": "sum",<br> "threshold": 1<br>}</pre> | no |
| <a name="input_lambda_failed_alert"></a> [lambda\_failed\_alert](#input\_lambda\_failed\_alert) | Alert for lambda failed | `any` | <pre>{<br> "equation": "gte",<br> "fill_insufficient_data": true,<br> "period": 60,<br> "statistic": "sum",<br> "threshold": 1<br>}</pre> | no |
| <a name="input_log_group_retention_days"></a> [log\_group\_retention\_days](#input\_log\_group\_retention\_days) | The retention days for cloudwatch log group | `number` | `7` | no |
| <a name="input_memory_size"></a> [memory\_size](#input\_memory\_size) | Memory size for Lambda function | `number` | `null` | no |
| <a name="input_recreate_missing_package"></a> [recreate\_missing\_package](#input\_recreate\_missing\_package) | Whether to recreate missing Lambda package if it is missing locally or not | `bool` | `true` | no |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ module "subscription" {

module "alerts" {
source = "dasmeta/monitoring/aws//modules/alerts"
version = "1.3.4"
version = "1.18.1"

sns_topic = var.fallback_sns_topic_name

Expand All @@ -77,10 +77,11 @@ module "alerts" {
filters = {
FunctionName = "${local.lambda_name}"
}
period = var.lambda_failed_alert.period
threshold = var.lambda_failed_alert.threshold
equation = var.lambda_failed_alert.equation
statistic = var.lambda_failed_alert.statistic
period = var.lambda_failed_alert.period
threshold = var.lambda_failed_alert.threshold
equation = var.lambda_failed_alert.equation
statistic = var.lambda_failed_alert.statistic
fill_insufficient_data = var.lambda_failed_alert.fill_insufficient_data
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,11 @@ variable "recreate_missing_package" {
variable "lambda_failed_alert" {
type = any
default = {
period = 60
threshold = 1
equation = "gte"
statistic = "sum"
period = 60
threshold = 1
equation = "gte"
statistic = "sum"
fill_insufficient_data = true
}
description = "Alert for lambda failed "
}
16 changes: 8 additions & 8 deletions modules/cloudwatch-alarm-actions/tests/jira/2-assert.tf
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
resource "test_assertions" "dummy" {
component = "monitoring-modules-cloudwatch-alarm-actions"
# resource "test_assertions" "dummy" {
# component = "monitoring-modules-cloudwatch-alarm-actions"

equal "scheme" {
description = "As module does not have any output and data just make sure the case runs. Probably can be thrown away."
got = "all good"
want = "all good"
}
}
# equal "scheme" {
# description = "As module does not have any output and data just make sure the case runs. Probably can be thrown away."
# got = "all good"
# want = "all good"
# }
# }
8 changes: 2 additions & 6 deletions modules/cloudwatch-alarm-actions/tests/jira/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@

## Providers

| Name | Version |
|------|---------|
| <a name="provider_test"></a> [test](#provider\_test) | n/a |
No providers.

## Modules

Expand All @@ -21,9 +19,7 @@

## Resources

| Name | Type |
|------|------|
| [test_assertions.dummy](https://registry.terraform.io/providers/hashicorp/test/latest/docs/resources/assertions) | resource |
No resources.

## Inputs

Expand Down
6 changes: 3 additions & 3 deletions modules/cloudwatch-alarm-actions/tests/teams/0-setup.tf
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
terraform {
required_providers {
test = {
source = "terraform.io/builtin/test"
}
# test = {
# source = "terraform.io/builtin/test"
# }

aws = {
source = "hashicorp/aws"
Expand Down
2 changes: 1 addition & 1 deletion modules/cloudwatch-alarm-actions/tests/teams/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

| Name | Type |
|------|------|
| test_assertions.dummy | resource |
| [test_assertions.dummy](https://registry.terraform.io/providers/hashicorp/test/latest/docs/resources/assertions) | resource |

## Inputs

Expand Down

0 comments on commit a2c3fc2

Please sign in to comment.