diff --git a/dynamodb.tf b/dynamodb.tf new file mode 100644 index 0000000..4d7217d --- /dev/null +++ b/dynamodb.tf @@ -0,0 +1,1127 @@ +resource "dynatrace_json_dashboard" "cosmo_dynamodb_dashboard_template" { + contents = jsonencode( + { + "dashboardMetadata": { + "name": var.dynamodb_dashboard_name + "shared": var.dynamodb_shared + "owner": var.dynamodb_owner_name + "tags": [ + "" + ], + "preset": var.dynamodb_preset + }, + "tiles": [ + { + "name": "ConditionalCheckFailedRequests", + "tileType": "DATA_EXPLORER", + "configured": true, + "bounds": { + "top": 38, + "left": 0, + "width": 304, + "height": 304 + }, + "tileFilter": {}, + "isAutoRefreshDisabled": false, + "customName": "Data explorer results", + "queries": [ + { + "id": "A", + "metric": "ext:cloud.aws.dynamodb.ConditionalCheckFailedRequestsSum", + "spaceAggregation": "AUTO", + "timeAggregation": "DEFAULT", + "splitBy": [], + "sortBy": "DESC", + "sortByDimension": "", + "filterBy": { + "nestedFilters": [], + "criteria": [] + }, + "limit": 20, + "rate": "NONE", + "enabled": true + } + ], + "visualConfig": { + "type": "GRAPH_CHART", + "global": {}, + "rules": [ + { + "matcher": "A:", + "properties": { + "color": "DEFAULT" + }, + "seriesOverrides": [] + } + ], + "axes": { + "xAxis": { + "displayName": "", + "visible": true + }, + "yAxes": [ + { + "displayName": "", + "visible": true, + "min": "AUTO", + "max": "AUTO", + "position": "LEFT", + "queryIds": [ + "A" + ], + "defaultAxis": true + } + ] + }, + "heatmapSettings": { + "yAxis": "VALUE" + }, + "thresholds": [ + { + "axisTarget": "LEFT", + "rules": [ + { + "color": "#7dc540" + }, + { + "color": "#f5d30f" + }, + { + "color": "#dc172a" + } + ], + "visible": true + } + ], + "tableSettings": { + "hiddenColumns": [] + }, + "graphChartSettings": { + "connectNulls": false + }, + "honeycombSettings": { + "showHive": true, + "showLegend": true, + "showLabels": false + } + }, + "queriesSettings": { + "resolution": "" + }, + "metricExpressions": [ + "resolution=null&(ext:cloud.aws.dynamodb.ConditionalCheckFailedRequestsSum:splitBy():sort(value(auto,descending)):limit(20)):limit(100):names" + ] + }, + { + "name": "ConsumedReadCapacityUnits", + "tileType": "DATA_EXPLORER", + "configured": true, + "bounds": { + "top": 38, + "left": 304, + "width": 304, + "height": 304 + }, + "tileFilter": {}, + "isAutoRefreshDisabled": false, + "customName": "Data explorer results", + "queries": [ + { + "id": "A", + "metric": "ext:cloud.aws.dynamodb.consumedReadCapacityUnitsSum", + "spaceAggregation": "AUTO", + "timeAggregation": "DEFAULT", + "splitBy": [], + "sortBy": "DESC", + "sortByDimension": "", + "filterBy": { + "nestedFilters": [], + "criteria": [] + }, + "limit": 20, + "rate": "NONE", + "enabled": true + } + ], + "visualConfig": { + "type": "GRAPH_CHART", + "global": {}, + "rules": [ + { + "matcher": "A:", + "properties": { + "color": "DEFAULT" + }, + "seriesOverrides": [] + } + ], + "axes": { + "xAxis": { + "displayName": "", + "visible": true + }, + "yAxes": [ + { + "displayName": "", + "visible": true, + "min": "AUTO", + "max": "AUTO", + "position": "LEFT", + "queryIds": [ + "A" + ], + "defaultAxis": true + } + ] + }, + "heatmapSettings": { + "yAxis": "VALUE" + }, + "thresholds": [ + { + "axisTarget": "LEFT", + "rules": [ + { + "color": "#7dc540" + }, + { + "color": "#f5d30f" + }, + { + "color": "#dc172a" + } + ], + "visible": true + } + ], + "tableSettings": { + "hiddenColumns": [] + }, + "graphChartSettings": { + "connectNulls": false + }, + "honeycombSettings": { + "showHive": true, + "showLegend": true, + "showLabels": false + } + }, + "queriesSettings": { + "resolution": "" + }, + "metricExpressions": [ + "resolution=null&(ext:cloud.aws.dynamodb.consumedReadCapacityUnitsSum:splitBy():sort(value(auto,descending)):limit(20)):limit(100):names" + ] + }, + { + "name": "ConsumedWriteCapacityUnits", + "tileType": "DATA_EXPLORER", + "configured": true, + "bounds": { + "top": 38, + "left": 608, + "width": 304, + "height": 304 + }, + "tileFilter": {}, + "isAutoRefreshDisabled": false, + "customName": "Data explorer results", + "queries": [ + { + "id": "A", + "metric": "ext:cloud.aws.dynamodb.consumedWriteCapacityUnitsSum", + "spaceAggregation": "AUTO", + "timeAggregation": "DEFAULT", + "splitBy": [], + "sortBy": "DESC", + "sortByDimension": "", + "filterBy": { + "nestedFilters": [], + "criteria": [] + }, + "limit": 20, + "rate": "NONE", + "enabled": true + } + ], + "visualConfig": { + "type": "GRAPH_CHART", + "global": {}, + "rules": [ + { + "matcher": "A:", + "properties": { + "color": "DEFAULT" + }, + "seriesOverrides": [] + } + ], + "axes": { + "xAxis": { + "displayName": "", + "visible": true + }, + "yAxes": [ + { + "displayName": "", + "visible": true, + "min": "AUTO", + "max": "AUTO", + "position": "LEFT", + "queryIds": [ + "A" + ], + "defaultAxis": true + } + ] + }, + "heatmapSettings": { + "yAxis": "VALUE" + }, + "thresholds": [ + { + "axisTarget": "LEFT", + "rules": [ + { + "color": "#7dc540" + }, + { + "color": "#f5d30f" + }, + { + "color": "#dc172a" + } + ], + "visible": true + } + ], + "tableSettings": { + "hiddenColumns": [] + }, + "graphChartSettings": { + "connectNulls": false + }, + "honeycombSettings": { + "showHive": true, + "showLegend": true, + "showLabels": false + } + }, + "queriesSettings": { + "resolution": "" + }, + "metricExpressions": [ + "resolution=null&(ext:cloud.aws.dynamodb.consumedWriteCapacityUnitsSum:splitBy():sort(value(auto,descending)):limit(20)):limit(100):names" + ] + }, + { + "name": "ReadThrottleEvents", + "tileType": "DATA_EXPLORER", + "configured": true, + "bounds": { + "top": 38, + "left": 912, + "width": 304, + "height": 304 + }, + "tileFilter": {}, + "isAutoRefreshDisabled": false, + "customName": "Data explorer results", + "queries": [ + { + "id": "A", + "metric": "ext:cloud.aws.dynamodb.ReadThrottleEventsSum", + "spaceAggregation": "AUTO", + "timeAggregation": "DEFAULT", + "splitBy": [], + "sortBy": "DESC", + "sortByDimension": "", + "filterBy": { + "nestedFilters": [], + "criteria": [] + }, + "limit": 20, + "rate": "NONE", + "enabled": true + } + ], + "visualConfig": { + "type": "GRAPH_CHART", + "global": {}, + "rules": [ + { + "matcher": "A:", + "properties": { + "color": "DEFAULT" + }, + "seriesOverrides": [] + } + ], + "axes": { + "xAxis": { + "displayName": "", + "visible": true + }, + "yAxes": [ + { + "displayName": "", + "visible": true, + "min": "AUTO", + "max": "AUTO", + "position": "LEFT", + "queryIds": [ + "A" + ], + "defaultAxis": true + } + ] + }, + "heatmapSettings": { + "yAxis": "VALUE" + }, + "thresholds": [ + { + "axisTarget": "LEFT", + "rules": [ + { + "color": "#7dc540" + }, + { + "color": "#f5d30f" + }, + { + "color": "#dc172a" + } + ], + "visible": true + } + ], + "tableSettings": { + "hiddenColumns": [] + }, + "graphChartSettings": { + "connectNulls": false + }, + "honeycombSettings": { + "showHive": true, + "showLegend": true, + "showLabels": false + } + }, + "queriesSettings": { + "resolution": "" + }, + "metricExpressions": [ + "resolution=null&(ext:cloud.aws.dynamodb.ReadThrottleEventsSum:splitBy():sort(value(auto,descending)):limit(20)):limit(100):names" + ] + }, + { + "name": "ReturnedItemCount", + "tileType": "DATA_EXPLORER", + "configured": true, + "bounds": { + "top": 342, + "left": 0, + "width": 304, + "height": 304 + }, + "tileFilter": {}, + "isAutoRefreshDisabled": false, + "customName": "Data explorer results", + "queries": [ + { + "id": "A", + "metric": "ext:cloud.aws.dynamodb.returnedItemCountSumByOperation", + "spaceAggregation": "AUTO", + "timeAggregation": "DEFAULT", + "splitBy": [], + "sortBy": "DESC", + "sortByDimension": "", + "filterBy": { + "nestedFilters": [], + "criteria": [] + }, + "limit": 20, + "rate": "NONE", + "enabled": true + } + ], + "visualConfig": { + "type": "GRAPH_CHART", + "global": {}, + "rules": [ + { + "matcher": "A:", + "properties": { + "color": "DEFAULT" + }, + "seriesOverrides": [] + } + ], + "axes": { + "xAxis": { + "displayName": "", + "visible": true + }, + "yAxes": [ + { + "displayName": "", + "visible": true, + "min": "AUTO", + "max": "AUTO", + "position": "LEFT", + "queryIds": [ + "A" + ], + "defaultAxis": true + } + ] + }, + "heatmapSettings": { + "yAxis": "VALUE" + }, + "thresholds": [ + { + "axisTarget": "LEFT", + "rules": [ + { + "color": "#7dc540" + }, + { + "color": "#f5d30f" + }, + { + "color": "#dc172a" + } + ], + "visible": true + } + ], + "tableSettings": { + "hiddenColumns": [] + }, + "graphChartSettings": { + "connectNulls": false + }, + "honeycombSettings": { + "showHive": true, + "showLegend": true, + "showLabels": false + } + }, + "queriesSettings": { + "resolution": "" + }, + "metricExpressions": [ + "resolution=null&(ext:cloud.aws.dynamodb.returnedItemCountSumByOperation:splitBy():sort(value(auto,descending)):limit(20)):limit(100):names" + ] + }, + { + "name": "SuccessfulRequestLatency", + "tileType": "DATA_EXPLORER", + "configured": true, + "bounds": { + "top": 342, + "left": 304, + "width": 304, + "height": 304 + }, + "tileFilter": {}, + "isAutoRefreshDisabled": false, + "customName": "Data explorer results", + "queries": [ + { + "id": "A", + "metric": "ext:cloud.aws.dynamodb.successfulRequestLatencyByOperation", + "spaceAggregation": "AUTO", + "timeAggregation": "DEFAULT", + "splitBy": [], + "sortBy": "DESC", + "sortByDimension": "", + "filterBy": { + "nestedFilters": [], + "criteria": [] + }, + "limit": 20, + "rate": "NONE", + "enabled": true + } + ], + "visualConfig": { + "type": "GRAPH_CHART", + "global": {}, + "rules": [ + { + "matcher": "A:", + "properties": { + "color": "DEFAULT" + }, + "seriesOverrides": [] + } + ], + "axes": { + "xAxis": { + "displayName": "", + "visible": true + }, + "yAxes": [ + { + "displayName": "", + "visible": true, + "min": "AUTO", + "max": "AUTO", + "position": "LEFT", + "queryIds": [ + "A" + ], + "defaultAxis": true + } + ] + }, + "heatmapSettings": { + "yAxis": "VALUE" + }, + "thresholds": [ + { + "axisTarget": "LEFT", + "rules": [ + { + "color": "#7dc540" + }, + { + "color": "#f5d30f" + }, + { + "color": "#dc172a" + } + ], + "visible": true + } + ], + "tableSettings": { + "hiddenColumns": [] + }, + "graphChartSettings": { + "connectNulls": false + }, + "honeycombSettings": { + "showHive": true, + "showLegend": true, + "showLabels": false + } + }, + "queriesSettings": { + "resolution": "" + }, + "metricExpressions": [ + "resolution=null&(ext:cloud.aws.dynamodb.successfulRequestLatencyByOperation:splitBy():sort(value(auto,descending)):limit(20)):limit(100):names" + ] + }, + { + "name": "SystemErrors", + "tileType": "DATA_EXPLORER", + "configured": true, + "bounds": { + "top": 342, + "left": 608, + "width": 304, + "height": 304 + }, + "tileFilter": {}, + "isAutoRefreshDisabled": false, + "customName": "Data explorer results", + "queries": [ + { + "id": "A", + "metric": "ext:cloud.aws.dynamodb.SystemErrorsSumByOperation", + "spaceAggregation": "AUTO", + "timeAggregation": "DEFAULT", + "splitBy": [], + "sortBy": "DESC", + "sortByDimension": "", + "filterBy": { + "nestedFilters": [], + "criteria": [] + }, + "limit": 20, + "rate": "NONE", + "enabled": true + } + ], + "visualConfig": { + "type": "GRAPH_CHART", + "global": {}, + "rules": [ + { + "matcher": "A:", + "properties": { + "color": "DEFAULT" + }, + "seriesOverrides": [] + } + ], + "axes": { + "xAxis": { + "displayName": "", + "visible": true + }, + "yAxes": [ + { + "displayName": "", + "visible": true, + "min": "AUTO", + "max": "AUTO", + "position": "LEFT", + "queryIds": [ + "A" + ], + "defaultAxis": true + } + ] + }, + "heatmapSettings": { + "yAxis": "VALUE" + }, + "thresholds": [ + { + "axisTarget": "LEFT", + "rules": [ + { + "color": "#7dc540" + }, + { + "color": "#f5d30f" + }, + { + "color": "#dc172a" + } + ], + "visible": true + } + ], + "tableSettings": { + "hiddenColumns": [] + }, + "graphChartSettings": { + "connectNulls": false + }, + "honeycombSettings": { + "showHive": true, + "showLegend": true, + "showLabels": false + } + }, + "queriesSettings": { + "resolution": "" + }, + "metricExpressions": [ + "resolution=null&(ext:cloud.aws.dynamodb.SystemErrorsSumByOperation:splitBy():sort(value(auto,descending)):limit(20)):limit(100):names" + ] + }, + { + "name": "ThrottledRequests", + "tileType": "DATA_EXPLORER", + "configured": true, + "bounds": { + "top": 342, + "left": 912, + "width": 304, + "height": 304 + }, + "tileFilter": {}, + "isAutoRefreshDisabled": false, + "customName": "Data explorer results", + "queries": [ + { + "id": "A", + "metric": "ext:cloud.aws.dynamodb.ThrottledRequestsSumByOperation", + "spaceAggregation": "AUTO", + "timeAggregation": "DEFAULT", + "splitBy": [], + "sortBy": "DESC", + "sortByDimension": "", + "filterBy": { + "nestedFilters": [], + "criteria": [] + }, + "limit": 20, + "rate": "NONE", + "enabled": true + } + ], + "visualConfig": { + "type": "GRAPH_CHART", + "global": {}, + "rules": [ + { + "matcher": "A:", + "properties": { + "color": "DEFAULT" + }, + "seriesOverrides": [] + } + ], + "axes": { + "xAxis": { + "displayName": "", + "visible": true + }, + "yAxes": [ + { + "displayName": "", + "visible": true, + "min": "AUTO", + "max": "AUTO", + "position": "LEFT", + "queryIds": [ + "A" + ], + "defaultAxis": true + } + ] + }, + "heatmapSettings": { + "yAxis": "VALUE" + }, + "thresholds": [ + { + "axisTarget": "LEFT", + "rules": [ + { + "color": "#7dc540" + }, + { + "color": "#f5d30f" + }, + { + "color": "#dc172a" + } + ], + "visible": true + } + ], + "tableSettings": { + "hiddenColumns": [] + }, + "graphChartSettings": { + "connectNulls": false + }, + "honeycombSettings": { + "showHive": true, + "showLegend": true, + "showLabels": false + } + }, + "queriesSettings": { + "resolution": "" + }, + "metricExpressions": [ + "resolution=null&(ext:cloud.aws.dynamodb.ThrottledRequestsSumByOperation:splitBy():sort(value(auto,descending)):limit(20)):limit(100):names" + ] + }, + { + "name": "TransactionConflict", + "tileType": "DATA_EXPLORER", + "configured": true, + "bounds": { + "top": 646, + "left": 0, + "width": 304, + "height": 304 + }, + "tileFilter": {}, + "isAutoRefreshDisabled": false, + "customName": "Data explorer results", + "queries": [ + { + "id": "A", + "metric": "ext:cloud.aws.dynamodb.TransactionConflictSum", + "spaceAggregation": "AUTO", + "timeAggregation": "DEFAULT", + "splitBy": [], + "sortBy": "DESC", + "sortByDimension": "", + "filterBy": { + "nestedFilters": [], + "criteria": [] + }, + "limit": 20, + "rate": "NONE", + "enabled": true + } + ], + "visualConfig": { + "type": "GRAPH_CHART", + "global": {}, + "rules": [ + { + "matcher": "A:", + "properties": { + "color": "DEFAULT" + }, + "seriesOverrides": [] + } + ], + "axes": { + "xAxis": { + "displayName": "", + "visible": true + }, + "yAxes": [ + { + "displayName": "", + "visible": true, + "min": "AUTO", + "max": "AUTO", + "position": "LEFT", + "queryIds": [ + "A" + ], + "defaultAxis": true + } + ] + }, + "heatmapSettings": { + "yAxis": "VALUE" + }, + "thresholds": [ + { + "axisTarget": "LEFT", + "rules": [ + { + "color": "#7dc540" + }, + { + "color": "#f5d30f" + }, + { + "color": "#dc172a" + } + ], + "visible": true + } + ], + "tableSettings": { + "hiddenColumns": [] + }, + "graphChartSettings": { + "connectNulls": false + }, + "honeycombSettings": { + "showHive": true, + "showLegend": true, + "showLabels": false + } + }, + "queriesSettings": { + "resolution": "" + }, + "metricExpressions": [ + "resolution=null&(ext:cloud.aws.dynamodb.TransactionConflictSum:splitBy():sort(value(auto,descending)):limit(20)):limit(100):names" + ] + }, + { + "name": "UserErrors", + "tileType": "DATA_EXPLORER", + "configured": true, + "bounds": { + "top": 646, + "left": 304, + "width": 304, + "height": 304 + }, + "tileFilter": {}, + "isAutoRefreshDisabled": false, + "customName": "Data explorer results", + "queries": [ + { + "id": "A", + "metric": "ext:cloud.aws.dynamodb.UserErrorsSum", + "spaceAggregation": "AUTO", + "timeAggregation": "DEFAULT", + "splitBy": [], + "sortBy": "DESC", + "sortByDimension": "", + "filterBy": { + "nestedFilters": [], + "criteria": [] + }, + "limit": 20, + "rate": "NONE", + "enabled": true + } + ], + "visualConfig": { + "type": "GRAPH_CHART", + "global": {}, + "rules": [ + { + "matcher": "A:", + "properties": { + "color": "DEFAULT" + }, + "seriesOverrides": [] + } + ], + "axes": { + "xAxis": { + "displayName": "", + "visible": true + }, + "yAxes": [ + { + "displayName": "", + "visible": true, + "min": "AUTO", + "max": "AUTO", + "position": "LEFT", + "queryIds": [ + "A" + ], + "defaultAxis": true + } + ] + }, + "heatmapSettings": { + "yAxis": "VALUE" + }, + "thresholds": [ + { + "axisTarget": "LEFT", + "rules": [ + { + "color": "#7dc540" + }, + { + "color": "#f5d30f" + }, + { + "color": "#dc172a" + } + ], + "visible": true + } + ], + "tableSettings": { + "hiddenColumns": [] + }, + "graphChartSettings": { + "connectNulls": false + }, + "honeycombSettings": { + "showHive": true, + "showLegend": true, + "showLabels": false + } + }, + "queriesSettings": { + "resolution": "" + }, + "metricExpressions": [ + "resolution=null&(ext:cloud.aws.dynamodb.UserErrorsSum:splitBy():sort(value(auto,descending)):limit(20)):limit(100):names" + ] + }, + { + "name": "WriteThrottleEvents", + "tileType": "DATA_EXPLORER", + "configured": true, + "bounds": { + "top": 646, + "left": 608, + "width": 304, + "height": 304 + }, + "tileFilter": {}, + "isAutoRefreshDisabled": false, + "customName": "Data explorer results", + "queries": [ + { + "id": "A", + "metric": "ext:cloud.aws.dynamodb.WriteThrottleEventsSum", + "spaceAggregation": "AUTO", + "timeAggregation": "DEFAULT", + "splitBy": [], + "sortBy": "DESC", + "sortByDimension": "", + "filterBy": { + "nestedFilters": [], + "criteria": [] + }, + "limit": 20, + "rate": "NONE", + "enabled": true + } + ], + "visualConfig": { + "type": "GRAPH_CHART", + "global": {}, + "rules": [ + { + "matcher": "A:", + "properties": { + "color": "DEFAULT" + }, + "seriesOverrides": [] + } + ], + "axes": { + "xAxis": { + "displayName": "", + "visible": true + }, + "yAxes": [ + { + "displayName": "", + "visible": true, + "min": "AUTO", + "max": "AUTO", + "position": "LEFT", + "queryIds": [ + "A" + ], + "defaultAxis": true + } + ] + }, + "heatmapSettings": { + "yAxis": "VALUE" + }, + "thresholds": [ + { + "axisTarget": "LEFT", + "rules": [ + { + "color": "#7dc540" + }, + { + "color": "#f5d30f" + }, + { + "color": "#dc172a" + } + ], + "visible": true + } + ], + "tableSettings": { + "hiddenColumns": [] + }, + "graphChartSettings": { + "connectNulls": false + }, + "honeycombSettings": { + "showHive": true, + "showLegend": true, + "showLabels": false + } + }, + "queriesSettings": { + "resolution": "" + }, + "metricExpressions": [ + "resolution=null&(ext:cloud.aws.dynamodb.WriteThrottleEventsSum:splitBy():sort(value(auto,descending)):limit(20)):limit(100):names" + ] + } + ] +}) +} \ No newline at end of file diff --git a/variables.tf b/variables.tf index 3cf1b5c..d74cb8c 100644 --- a/variables.tf +++ b/variables.tf @@ -77,3 +77,18 @@ variable "elasticache_dashboard_name" { variable "elasticache_preset" { type = bool } + +variable "dynamodb_owner_name" { + type = string +} +variable "dynamodb_shared" { + type = string +} + +variable "dynamodb_dashboard_name" { + type = string +} + +variable "dynamodb_preset" { + type = bool +}