-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(DMVP-4004): Added redis metrics to dashboard
- Loading branch information
1 parent
a12d91e
commit 2ddafa3
Showing
49 changed files
with
1,549 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# rds | ||
|
||
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK --> | ||
## Requirements | ||
|
||
No requirements. | ||
|
||
## Providers | ||
|
||
No providers. | ||
|
||
## Modules | ||
|
||
No modules. | ||
|
||
## Resources | ||
|
||
No resources. | ||
|
||
## Inputs | ||
|
||
| Name | Description | Type | Default | Required | | ||
|------|-------------|------|---------|:--------:| | ||
| <a name="input_db_max_connections_count"></a> [db\_max\_connections\_count](#input\_db\_max\_connections\_count) | RDS maximum connection count | `string` | `null` | no | | ||
| <a name="input_name"></a> [name](#input\_name) | RDS name | `string` | n/a | yes | | ||
| <a name="input_region"></a> [region](#input\_region) | n/a | `string` | `""` | no | | ||
|
||
## Outputs | ||
|
||
| Name | Description | | ||
|------|-------------| | ||
| <a name="output_result"></a> [result](#output\_result) | description | | ||
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
output "result" { | ||
description = "description" | ||
value = [ | ||
[ | ||
{ type : "text/title-with-link", text : "Redis (${var.name})", link_to_jump = "https://${var.region}.console.aws.amazon.com/elasticache/home?region=${var.region}#/redis/${var.name}" } | ||
], | ||
[ | ||
{ type : "redis/cpu", redis_name : var.name }, | ||
{ type : "redis/memory", redis_name : var.name }, | ||
{ type : "redis/capacity", redis_name : var.name }, | ||
{ type : "redis/cache-hit", redis_name : var.name }, | ||
], | ||
[ | ||
{ type : "redis/current-connections", redis_name : var.name }, | ||
{ type : "redis/new-connections", redis_name : var.name }, | ||
{ type : "redis/network", redis_name : var.name }, | ||
{ type : "redis/latency", redis_name : var.name }, | ||
] | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
variable "name" { | ||
type = string | ||
description = "RDS name" | ||
} | ||
|
||
variable "db_max_connections_count" { | ||
type = string | ||
description = "RDS maximum connection count" | ||
default = null | ||
} | ||
|
||
variable "region" { | ||
type = string | ||
default = "" | ||
} |
78 changes: 78 additions & 0 deletions
78
modules/dashboard/modules/widgets/redis/cache-hit/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
<!-- BEGIN_TF_DOCS --> | ||
## Requirements | ||
|
||
No requirements. | ||
|
||
## Providers | ||
|
||
| Name | Version | | ||
|------|---------| | ||
| <a name="provider_aws"></a> [aws](#provider\_aws) | n/a | | ||
|
||
## Modules | ||
|
||
| Name | Source | Version | | ||
|------|--------|---------| | ||
| <a name="module_base"></a> [base](#module\_base) | ../../base | n/a | | ||
|
||
## Resources | ||
|
||
| Name | Type | | ||
|------|------| | ||
| [aws_caller_identity.project](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/caller_identity) | data source | | ||
|
||
## Inputs | ||
|
||
| Name | Description | Type | Default | Required | | ||
|------|-------------|------|---------|:--------:| | ||
| <a name="input_account_id"></a> [account\_id](#input\_account\_id) | n/a | `string` | `null` | no | | ||
| <a name="input_anomaly_detection"></a> [anomaly\_detection](#input\_anomaly\_detection) | Allow to enable anomaly detection on widget metrics | `bool` | `false` | no | | ||
| <a name="input_cluster"></a> [cluster](#input\_cluster) | n/a | `string` | n/a | yes | | ||
| <a name="input_container"></a> [container](#input\_container) | n/a | `string` | n/a | yes | | ||
| <a name="input_coordinates"></a> [coordinates](#input\_coordinates) | position | <pre>object({<br> x : number<br> y : number<br> width : number<br> height : number<br> })</pre> | n/a | yes | | ||
| <a name="input_namespace"></a> [namespace](#input\_namespace) | n/a | `string` | `"default"` | no | | ||
| <a name="input_period"></a> [period](#input\_period) | stats | `number` | `300` | no | | ||
|
||
## Outputs | ||
|
||
| Name | Description | | ||
|------|-------------| | ||
| <a name="output_data"></a> [data](#output\_data) | n/a | | ||
<!-- END_TF_DOCS --> | ||
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK --> | ||
## Requirements | ||
|
||
No requirements. | ||
|
||
## Providers | ||
|
||
No providers. | ||
|
||
## Modules | ||
|
||
| Name | Source | Version | | ||
|------|--------|---------| | ||
| <a name="module_base"></a> [base](#module\_base) | ../../base | n/a | | ||
|
||
## Resources | ||
|
||
No resources. | ||
|
||
## Inputs | ||
|
||
| Name | Description | Type | Default | Required | | ||
|------|-------------|------|---------|:--------:| | ||
| <a name="input_anomaly_detection"></a> [anomaly\_detection](#input\_anomaly\_detection) | Allow to enable anomaly detection on widget metrics | `bool` | `false` | no | | ||
| <a name="input_anomaly_deviation"></a> [anomaly\_deviation](#input\_anomaly\_deviation) | Deviation of the anomaly band | `number` | `6` | no | | ||
| <a name="input_coordinates"></a> [coordinates](#input\_coordinates) | position | <pre>object({<br> x : number<br> y : number<br> width : number<br> height : number<br> })</pre> | n/a | yes | | ||
| <a name="input_data_source_uid"></a> [data\_source\_uid](#input\_data\_source\_uid) | The grafana dashboard widget item data source id | `string` | n/a | yes | | ||
| <a name="input_period"></a> [period](#input\_period) | stats | `number` | `300` | no | | ||
| <a name="input_platform"></a> [platform](#input\_platform) | The platform/service/adapter to create dashboard on. for now only cloudwatch and grafana supported | `string` | `"cloudwatch"` | no | | ||
| <a name="input_redis_name"></a> [redis\_name](#input\_redis\_name) | ElastiCache instance name | `string` | n/a | yes | | ||
|
||
## Outputs | ||
|
||
| Name | Description | | ||
|------|-------------| | ||
| <a name="output_data"></a> [data](#output\_data) | n/a | | ||
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
module "base" { | ||
source = "../../base" | ||
|
||
platform = var.platform | ||
data_source_uid = var.data_source_uid | ||
|
||
coordinates = var.coordinates | ||
|
||
name = "Cache Hit Rate" | ||
|
||
defaults = { | ||
MetricNamespace = "AWS/ElastiCache" | ||
CacheClusterId = var.redis_name | ||
} | ||
|
||
period = var.period | ||
|
||
metrics = [ | ||
{ MetricName = "CacheHitRate", color = "#7FFFD4", anomaly_detection = var.anomaly_detection, anomaly_deviation = var.anomaly_deviation }, | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
output "data" { | ||
value = module.base.data | ||
} |
44 changes: 44 additions & 0 deletions
44
modules/dashboard/modules/widgets/redis/cache-hit/variables.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
variable "platform" { | ||
type = string | ||
default = "cloudwatch" | ||
description = "The platform/service/adapter to create dashboard on. for now only cloudwatch and grafana supported" | ||
} | ||
|
||
variable "data_source_uid" { | ||
type = string | ||
description = "The grafana dashboard widget item data source id" | ||
} | ||
|
||
|
||
# position | ||
variable "coordinates" { | ||
type = object({ | ||
x : number | ||
y : number | ||
width : number | ||
height : number | ||
}) | ||
} | ||
|
||
# stats | ||
variable "period" { | ||
type = number | ||
default = 300 | ||
} | ||
|
||
variable "redis_name" { | ||
type = string | ||
description = "ElastiCache instance name" | ||
} | ||
|
||
variable "anomaly_detection" { | ||
type = bool | ||
default = false | ||
description = "Allow to enable anomaly detection on widget metrics" | ||
} | ||
|
||
variable "anomaly_deviation" { | ||
type = number | ||
default = 6 | ||
description = "Deviation of the anomaly band" | ||
} |
Oops, something went wrong.