From 77caea7cb5fd0dc1250201390bf9e48e9ed5b14d Mon Sep 17 00:00:00 2001 From: MOHAMMED-ho Date: Tue, 15 Oct 2024 13:05:26 +0100 Subject: [PATCH] amending Readme.md adding s3 dashboard module renaming variable.tf CCL-898 json config updating visual config updating width of tiles adding .github adding .github adding .github CCL-898 golden dashboards CCL-898 added mks dashboards CCL-898 latest CCL-898-test latest classic dashboards adding varibales file amending README file adding varibles correcting readme file removing .ided/,DSstore etc removing .ided/,DSstore etc moving terraform files into root folder chaning workflow name chaning workflow name --- .github/dependabot.yaml | 24 + .github/workflows/pull-request-sast.yaml | 26 + .../pull-request-semver-label-check.yaml | 39 + .../pull-request-semver-tag-merge.yaml | 46 + .gitignore | 43 + README.md | 2 +- msk.tf | 958 ++++++++++++++++++ output.tf | 9 + provider.tf | 8 + rds.tf | 773 ++++++++++++++ s3.tf | 551 ++++++++++ variables.tf | 42 + 12 files changed, 2520 insertions(+), 1 deletion(-) create mode 100644 .github/dependabot.yaml create mode 100644 .github/workflows/pull-request-sast.yaml create mode 100644 .github/workflows/pull-request-semver-label-check.yaml create mode 100644 .github/workflows/pull-request-semver-tag-merge.yaml create mode 100644 .gitignore create mode 100644 msk.tf create mode 100644 output.tf create mode 100644 provider.tf create mode 100644 rds.tf create mode 100644 s3.tf create mode 100644 variables.tf diff --git a/.github/dependabot.yaml b/.github/dependabot.yaml new file mode 100644 index 0000000..a473a6b --- /dev/null +++ b/.github/dependabot.yaml @@ -0,0 +1,24 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "daily" + commit-message: + prefix: "(GHA)" + reviewers: + - "UKHomeOffice/core-cloud-devops" + labels: + - "dependencies" + - "patch" + - package-ecosystem: "terraform" + directory: "/" + schedule: + interval: "daily" + commit-message: + prefix: "(TF)" + reviewers: + - "UKHomeOffice/core-cloud-devops" + labels: + - "dependencies" + - "patch" \ No newline at end of file diff --git a/.github/workflows/pull-request-sast.yaml b/.github/workflows/pull-request-sast.yaml new file mode 100644 index 0000000..f9d50af --- /dev/null +++ b/.github/workflows/pull-request-sast.yaml @@ -0,0 +1,26 @@ +name: Validate Terraform with Trivy + +on: + push: + branches: + - main + pull_request: + +permissions: + contents: read + +jobs: + RunTerraformValidation: + name: Scan Terraform Config + runs-on: ubuntu-latest + + steps: + - name: Clone the Repository + uses: actions/checkout@v4 + + # Results have to be a table as the organisation does not have Advanced Security license. + - name: Scan Terraform Config + uses: aquasecurity/trivy-action@0.19.0 + with: + scan-type: 'config' + exit-code: '1' diff --git a/.github/workflows/pull-request-semver-label-check.yaml b/.github/workflows/pull-request-semver-label-check.yaml new file mode 100644 index 0000000..89fecce --- /dev/null +++ b/.github/workflows/pull-request-semver-label-check.yaml @@ -0,0 +1,39 @@ +name: 'Check PR for SemVer Label' +on: + pull_request: + types: + - labeled + - unlabeled + - opened + - reopened + - synchronize + branches: + - main + +permissions: + pull-requests: read + contents: read + +jobs: + semver-check: + name: 'Check PR for SemVer Label' + if: | + contains(github.event.pull_request.labels.*.name, 'skip-release') == false + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Parse the SemVer label + id: label + uses: UKHomeOffice/match-label-action@v1 + with: + labels: minor,major,patch + mode: singular + + - name: Calculate SemVer value + id: calculate + uses: UKHomeOffice/semver-calculate-action@v2 + with: + increment: ${{ steps.label.outputs.matchedLabels }} + github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/pull-request-semver-tag-merge.yaml b/.github/workflows/pull-request-semver-tag-merge.yaml new file mode 100644 index 0000000..146e0ca --- /dev/null +++ b/.github/workflows/pull-request-semver-tag-merge.yaml @@ -0,0 +1,46 @@ +name: 'SemVer Tag on Main Merge' +on: + pull_request: + types: + - closed + branches: + - main + +permissions: + pull-requests: read + contents: write + +concurrency: + group: ${{ github.workflow }} + cancel-in-progress: false + +jobs: + semver-tag: + name: 'Tag Repository with SemVer' + if: | + github.event.pull_request.merged == true && + contains(github.event.pull_request.labels.*.name, 'skip-release') == false + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Parse the SemVer label + id: label + uses: UKHomeOffice/match-label-action@v1 + with: + labels: minor,major,patch + mode: singular + + - name: Calculate SemVer value + id: calculate + uses: UKHomeOffice/semver-calculate-action@v2 + with: + increment: ${{ steps.label.outputs.matchedLabels }} + github_token: ${{ secrets.GITHUB_TOKEN }} + + - name: Tag Repository + uses: UKHomeOffice/semver-tag-action@v4 + with: + tag: ${{ steps.calculate.outputs.version }} + github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..870f845 --- /dev/null +++ b/.gitignore @@ -0,0 +1,43 @@ +# Local .terraform directories +**/.terraform/* + +**/.terraform* +**/.terragrunt* + +# .tfstate files +*.tfstate +*.tfstate.* + +# Crash log files +crash.log +crash.*.log + +# Exclude all .tfvars files, which are likely to contain sensitive data, such as +# password, private keys, and other secrets. These should not be part of version +# control as they are data points which are potentially sensitive and subject +# to change depending on the environment. +*.tfvars +*.tfvars.json + +# Ignore override files as they are usually used to override resources locally and so +# are not checked in +override.tf +override.tf.json +*_override.tf +*_override.tf.json + +# Include override files you do wish to add to version control using negated pattern +# !example_override.tf + +# Include tfplan files to ignore the plan output of command: terraform plan -out=tfplan +# example: *tfplan* + +# Ignore CLI configuration files +.terraformrc +terraform.rc + +*.env + +__dont_track* + +.DS_Store \ No newline at end of file diff --git a/README.md b/README.md index 7866664..ebf749a 100644 --- a/README.md +++ b/README.md @@ -1 +1 @@ -# core-cloud-dynatrace-golden-dashboards-terraform +Note: as we dont have any metrics in Dynatarce as of yet, these templates do not contain the dimensions for now, these will be updated once we have got metrics coming into dynatrace. diff --git a/msk.tf b/msk.tf new file mode 100644 index 0000000..0110d4d --- /dev/null +++ b/msk.tf @@ -0,0 +1,958 @@ +resource "dynatrace_json_dashboard" "comos_msk_dasboard_terraform" { + contents = jsonencode( + { + "dashboardMetadata" : { + "name" : var.mks_dashbaord_name + "shared" : var.mks_shared + "owner" : var.mks_owner_name + "tags" : [ + "cosmos" + ], + "preset" : var.mks_preset + }, + "tiles": [ + { + "name": "PartitionCount", + "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.kafka.partitionCountByBrokerID", + "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": "Y axis", + "visible": true, + "min": "AUTO", + "max": "AUTO", + "position": "LEFT", + "queryIds": [ + "A" + ], + "defaultAxis": true + } + ] + }, + "heatmapSettings": { + "yAxis": "VALUE", + "showLabels": false + }, + "singleValueSettings": { + "showTrend": true, + "showSparkLine": true, + "linkTileColorToThreshold": true + }, + "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.kafka.partitionCountByBrokerID:splitBy():sort(value(auto,descending)):limit(20)):limit(100):names" + ] + }, + { + "name": "MemoryUsed", + "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.kafka.memoryUsedByBrokerID", + "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", + "showLabels": false + }, + "singleValueSettings": { + "showTrend": true, + "showSparkLine": true, + "linkTileColorToThreshold": true + }, + "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.kafka.memoryUsedByBrokerID:splitBy():sort(value(auto,descending)):limit(20)):limit(100):names" + ] + }, + { + "name": "BytesInPerSec", + "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.kafka.bytesInPerSecSumByBrokerIDTopic", + "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", + "showLabels": false + }, + "singleValueSettings": { + "showTrend": true, + "showSparkLine": true, + "linkTileColorToThreshold": true + }, + "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.kafka.bytesInPerSecSumByBrokerIDTopic:splitBy():sort(value(auto,descending)):limit(20)):limit(100):names" + ] + }, + { + "name": "BytesOutPerSec", + "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.kafka.bytesOutPerSecSumByBrokerIDTopic", + "spaceAggregation": "AUTO", + "timeAggregation": "DEFAULT", + "splitBy": [], + "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", + "showLabels": false + }, + "singleValueSettings": { + "showTrend": true, + "showSparkLine": true, + "linkTileColorToThreshold": true + }, + "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.kafka.bytesOutPerSecSumByBrokerIDTopic:splitBy():sort(value(auto,descending)):limit(20)):limit(100):names" + ] + }, + { + "name": "CpuUser", + "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.kafka.cpuUserSumByBrokerID", + "spaceAggregation": "AUTO", + "timeAggregation": "DEFAULT", + "splitBy": [], + "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", + "showLabels": false + }, + "singleValueSettings": { + "showTrend": true, + "showSparkLine": true, + "linkTileColorToThreshold": true + }, + "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.kafka.cpuUserSumByBrokerID:splitBy():sort(value(auto,descending)):limit(20)):limit(100):names" + ] + }, + { + "name": "CpuSystem", + "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.kafka.cpuSystemSumByBrokerID", + "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", + "showLabels": false + }, + "singleValueSettings": { + "showTrend": true, + "showSparkLine": true, + "linkTileColorToThreshold": true + }, + "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.kafka.cpuSystemSumByBrokerID:splitBy():sort(value(auto,descending)):limit(20)):limit(100):names" + ] + }, + { + "name": "KafkaDataLogsDiskUsed", + "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.kafka.kafkaAppLogsDiskUsedByBrokerID", + "spaceAggregation": "AUTO", + "timeAggregation": "DEFAULT", + "splitBy": [], + "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", + "showLabels": false + }, + "singleValueSettings": { + "showTrend": true, + "showSparkLine": true, + "linkTileColorToThreshold": true + }, + "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.kafka.kafkaAppLogsDiskUsedByBrokerID:splitBy():sort(value(auto,descending)):limit(20)):limit(100):names" + ] + }, + { + "name": "NetworkTxPackets", + "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.kafka.networkRxPacketsByBrokerID", + "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", + "showLabels": false + }, + "singleValueSettings": { + "showTrend": true, + "showSparkLine": true, + "linkTileColorToThreshold": true + }, + "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.kafka.networkRxPacketsByBrokerID:splitBy():sort(value(auto,descending)):limit(20)):limit(100):names" + ] + }, + { + "name": "NetworkTxPackets", + "tileType": "DATA_EXPLORER", + "configured": true, + "bounds": { + "top": 38, + "left": 1216, + "width": 304, + "height": 304 + }, + "tileFilter": {}, + "isAutoRefreshDisabled": false, + "customName": "Data explorer results", + "queries": [ + { + "id": "A", + "metric": "ext:cloud.aws.kafka.networkRxPacketsByBrokerID", + "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", + "showLabels": false + }, + "singleValueSettings": { + "showTrend": true, + "showSparkLine": true, + "linkTileColorToThreshold": true + }, + "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.kafka.networkRxPacketsByBrokerID:splitBy():sort(value(auto,descending)):limit(20)):limit(100):names" + ] + } + ] +}) +} \ No newline at end of file diff --git a/output.tf b/output.tf new file mode 100644 index 0000000..377b4f3 --- /dev/null +++ b/output.tf @@ -0,0 +1,9 @@ +# output "s3_dashboard_id" { +# description = "The ID of the created Dynatrace S3 dashboard." +# value = dynatrace_dashboard.s3_dashboard.id +# } + +# output "s3_dashboard_url" { +# description = "The URL to access the S3 monitoring dashboard in Dynatrace." +# value = dynatrace_dashboard.s3_dashboard.url +# } diff --git a/provider.tf b/provider.tf new file mode 100644 index 0000000..59ee8ed --- /dev/null +++ b/provider.tf @@ -0,0 +1,8 @@ +terraform { + required_providers { + dynatrace = { + version = "~> 1.0" + source = "dynatrace-oss/dynatrace" + } + } +} \ No newline at end of file diff --git a/rds.tf b/rds.tf new file mode 100644 index 0000000..612667c --- /dev/null +++ b/rds.tf @@ -0,0 +1,773 @@ +resource "dynatrace_json_dashboard" "comos_rds_dasboard_terraform" { + contents = jsonencode( + { + "dashboardMetadata" : { + "name" : var.rds_dashbaord_name + "shared" : var.rds_shared + "owner" : var.rds_owner_name + "tags" : [ + "cosmos" + ], + "preset" : var.rds_preset + }, + "tiles": [ + { + "name": "FreeableMemory", + "tileType": "DATA_EXPLORER", + "configured": true, + "bounds": { + "top": 0, + "left": 38, + "width": 266, + "height": 266 + }, + "tileFilter": {}, + "isAutoRefreshDisabled": false, + "customName": "Data explorer results", + "queries": [ + { + "id": "A", + "metric": "ext:cloud.aws.rds.freeableMemoryByRegionEngineName", + "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.rds.freeableMemoryByRegionEngineName:splitBy():sort(value(auto,descending)):limit(20)):limit(100):names" + ] + }, + { + "name": "DatabaseConnections", + "tileType": "DATA_EXPLORER", + "configured": true, + "bounds": { + "top": 0, + "left": 380, + "width": 304, + "height": 266 + }, + "tileFilter": {}, + "isAutoRefreshDisabled": false, + "customName": "DatabaseConnections", + "queries": [ + { + "id": "A", + "metric": "ext:cloud.aws.rds.databaseConnectionsSum", + "spaceAggregation": "AUTO", + "timeAggregation": "DEFAULT", + "splitBy": [], + "sortBy": "DESC", + "sortByDimension": "", + "filterBy": { + "nestedFilters": [], + "criteria": [] + }, + "limit": 20, + "rate": "NONE", + "enabled": true + } + ], + "visualConfig": { + "type": "SINGLE_VALUE", + "global": {}, + "rules": [ + { + "matcher": "A:", + "properties": { + "color": "DEFAULT" + }, + "seriesOverrides": [] + } + ], + "axes": { + "xAxis": { + "visible": true + }, + "yAxes": [] + }, + "heatmapSettings": { + "yAxis": "VALUE" + }, + "singleValueSettings": { + "showTrend": true, + "showSparkLine": true, + "linkTileColorToThreshold": true + }, + "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=Inf&(ext:cloud.aws.rds.databaseConnectionsSum:splitBy():sort(value(auto,descending)):limit(20)):limit(100):names", + "resolution=null&(ext:cloud.aws.rds.databaseConnectionsSum:splitBy():sort(value(auto,descending)):limit(20))" + ] + }, + { + "name": "CPUUtilization", + "nameSize": "medium", + "tileType": "DATA_EXPLORER", + "configured": true, + "bounds": { + "top": 0, + "left": 760, + "width": 304, + "height": 304 + }, + "tileFilter": {}, + "isAutoRefreshDisabled": false, + "customName": "CPUUtilization", + "queries": [ + { + "id": "A", + "metric": "ext:cloud.aws.ec.cpuUtilization", + "spaceAggregation": "AUTO", + "timeAggregation": "DEFAULT", + "splitBy": [], + "sortBy": "DESC", + "sortByDimension": "", + "filterBy": { + "nestedFilters": [], + "criteria": [] + }, + "limit": 20, + "rate": "NONE", + "enabled": true + } + ], + "visualConfig": { + "type": "SINGLE_VALUE", + "global": {}, + "rules": [ + { + "matcher": "A:", + "properties": { + "color": "DEFAULT" + }, + "seriesOverrides": [] + } + ], + "axes": { + "xAxis": { + "visible": true + }, + "yAxes": [] + }, + "heatmapSettings": { + "yAxis": "VALUE" + }, + "singleValueSettings": { + "showTrend": true, + "showSparkLine": true, + "linkTileColorToThreshold": true + }, + "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=Inf&(ext:cloud.aws.ec.cpuUtilization:splitBy():sort(value(auto,descending)):limit(20)):limit(100):names", + "resolution=null&(ext:cloud.aws.ec.cpuUtilization:splitBy():sort(value(auto,descending)):limit(20))" + ] + }, + { + "name": "FreeStorageSpace", + "nameSize": "medium", + "tileType": "DATA_EXPLORER", + "configured": true, + "bounds": { + "top": 342, + "left": 0, + "width": 304, + "height": 304 + }, + "tileFilter": {}, + "isAutoRefreshDisabled": false, + "customName": "FreeStorageSpace", + "queries": [ + { + "id": "A", + "metric": "ext:cloud.aws.rds.freeStorageSpace", + "spaceAggregation": "AUTO", + "timeAggregation": "DEFAULT", + "splitBy": [], + "sortBy": "DESC", + "sortByDimension": "", + "filterBy": { + "nestedFilters": [], + "criteria": [] + }, + "limit": 20, + "rate": "NONE", + "enabled": true + } + ], + "visualConfig": { + "type": "PIE_CHART", + "global": {}, + "rules": [ + { + "matcher": "A:", + "properties": { + "color": "DEFAULT" + }, + "seriesOverrides": [] + } + ], + "axes": { + "xAxis": { + "visible": true + }, + "yAxes": [] + }, + "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=Inf&(ext:cloud.aws.rds.freeStorageSpace:splitBy():sort(value(auto,descending)):limit(20)):limit(100):names" + ] + }, + { + "name": "ReadLatency", + "tileType": "DATA_EXPLORER", + "configured": true, + "bounds": { + "top": 342, + "left": 380, + "width": 304, + "height": 304 + }, + "tileFilter": {}, + "isAutoRefreshDisabled": false, + "customName": "ReadLatency", + "queries": [ + { + "id": "A", + "metric": "ext:cloud.aws.rds.readLatency", + "spaceAggregation": "AUTO", + "timeAggregation": "DEFAULT", + "splitBy": [], + "sortBy": "DESC", + "sortByDimension": "", + "filterBy": { + "nestedFilters": [], + "criteria": [] + }, + "limit": 20, + "rate": "NONE", + "enabled": true + } + ], + "visualConfig": { + "type": "SINGLE_VALUE", + "global": {}, + "rules": [ + { + "matcher": "A:", + "properties": { + "color": "DEFAULT" + }, + "seriesOverrides": [] + } + ], + "axes": { + "xAxis": { + "visible": true + }, + "yAxes": [] + }, + "heatmapSettings": { + "yAxis": "VALUE" + }, + "singleValueSettings": { + "showTrend": true, + "showSparkLine": true, + "linkTileColorToThreshold": true + }, + "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=Inf&(ext:cloud.aws.rds.readLatency:splitBy():sort(value(auto,descending)):limit(20)):limit(100):names", + "resolution=null&(ext:cloud.aws.rds.readLatency:splitBy():sort(value(auto,descending)):limit(20))" + ] + }, + { + "name": "WriteLatency", + "tileType": "DATA_EXPLORER", + "configured": true, + "bounds": { + "top": 342, + "left": 760, + "width": 304, + "height": 304 + }, + "tileFilter": {}, + "isAutoRefreshDisabled": false, + "customName": "WriteLatency", + "queries": [ + { + "id": "A", + "metric": "ext:cloud.aws.rds.writeLatency", + "spaceAggregation": "AUTO", + "timeAggregation": "DEFAULT", + "splitBy": [], + "sortBy": "DESC", + "sortByDimension": "", + "filterBy": { + "nestedFilters": [], + "criteria": [] + }, + "limit": 20, + "rate": "NONE", + "enabled": true + } + ], + "visualConfig": { + "type": "SINGLE_VALUE", + "global": {}, + "rules": [ + { + "matcher": "A:", + "properties": { + "color": "DEFAULT" + }, + "seriesOverrides": [] + } + ], + "axes": { + "xAxis": { + "visible": true + }, + "yAxes": [] + }, + "heatmapSettings": { + "yAxis": "VALUE" + }, + "singleValueSettings": { + "showTrend": true, + "showSparkLine": true, + "linkTileColorToThreshold": true + }, + "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=Inf&(ext:cloud.aws.rds.writeLatency:splitBy():sort(value(auto,descending)):limit(20)):limit(100):names", + "resolution=null&(ext:cloud.aws.rds.writeLatency:splitBy():sort(value(auto,descending)):limit(20))" + ] + }, + { + "name": "NetworkReceiveThroughput", + "nameSize": "medium", + "tileType": "DATA_EXPLORER", + "configured": true, + "bounds": { + "top": 722, + "left": 0, + "width": 304, + "height": 304 + }, + "tileFilter": {}, + "isAutoRefreshDisabled": false, + "customName": "NetworkReceiveThroughput", + "queries": [ + { + "id": "A", + "metric": "ext:cloud.aws.rds.networkReceiveThroughput", + "spaceAggregation": "AUTO", + "timeAggregation": "DEFAULT", + "splitBy": [], + "sortBy": "DESC", + "sortByDimension": "", + "filterBy": { + "nestedFilters": [], + "criteria": [] + }, + "limit": 20, + "rate": "NONE", + "enabled": true + } + ], + "visualConfig": { + "type": "SINGLE_VALUE", + "global": {}, + "rules": [ + { + "matcher": "A:", + "properties": { + "color": "DEFAULT" + }, + "seriesOverrides": [] + } + ], + "axes": { + "xAxis": { + "visible": true + }, + "yAxes": [] + }, + "heatmapSettings": { + "yAxis": "VALUE" + }, + "singleValueSettings": { + "showTrend": true, + "showSparkLine": true, + "linkTileColorToThreshold": true + }, + "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=Inf&(ext:cloud.aws.rds.networkReceiveThroughput:splitBy():sort(value(auto,descending)):limit(20)):limit(100):names", + "resolution=null&(ext:cloud.aws.rds.networkReceiveThroughput:splitBy():sort(value(auto,descending)):limit(20))" + ] + }, + { + "name": "NetworkTransmitThroughpu", + "nameSize": "medium", + "tileType": "DATA_EXPLORER", + "configured": true, + "bounds": { + "top": 722, + "left": 380, + "width": 304, + "height": 304 + }, + "tileFilter": {}, + "isAutoRefreshDisabled": false, + "customName": "NetworkTransmitThroughpu", + "queries": [ + { + "id": "A", + "metric": "ext:cloud.aws.rds.networkTransmitThroughput", + "spaceAggregation": "AUTO", + "timeAggregation": "DEFAULT", + "splitBy": [], + "sortBy": "DESC", + "sortByDimension": "", + "filterBy": { + "nestedFilters": [], + "criteria": [] + }, + "limit": 20, + "rate": "NONE", + "enabled": true + } + ], + "visualConfig": { + "type": "SINGLE_VALUE", + "global": {}, + "rules": [ + { + "matcher": "A:", + "properties": { + "color": "DEFAULT" + }, + "seriesOverrides": [] + } + ], + "axes": { + "xAxis": { + "visible": true + }, + "yAxes": [] + }, + "heatmapSettings": { + "yAxis": "VALUE" + }, + "singleValueSettings": { + "showTrend": true, + "showSparkLine": true, + "linkTileColorToThreshold": true + }, + "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=Inf&(ext:cloud.aws.rds.networkTransmitThroughput:splitBy():sort(value(auto,descending)):limit(20)):limit(100):names", + "resolution=null&(ext:cloud.aws.rds.networkTransmitThroughput:splitBy():sort(value(auto,descending)):limit(20))" + ] + } + ] +}) +} \ No newline at end of file diff --git a/s3.tf b/s3.tf new file mode 100644 index 0000000..ef4d699 --- /dev/null +++ b/s3.tf @@ -0,0 +1,551 @@ +resource "dynatrace_json_dashboard" "s3_dashboard_template" { + contents = jsonencode( + { + "dashboardMetadata": { + "name": var.s3_dashbaord_name + "shared": var.s3_shared + "owner": var.s3_owner_name + "tags": [ + "" + ], + "preset": var.s3_preset + }, + "tiles": [ + { + "name": "BytesDownloaded", + "tileType": "DATA_EXPLORER", + "configured": true, + "bounds": { + "top": 0, + "left": 0, + "width": 304, + "height": 304 + }, + "tileFilter": {}, + "isAutoRefreshDisabled": false, + "customName": "Data explorer results", + "queries": [ + { + "id": "A", + "metric": "ext:cloud.aws.s3.bytesDownloadedByFilterId", + "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", + "showLabels": false + }, + "singleValueSettings": { + "showTrend": true, + "showSparkLine": true, + "linkTileColorToThreshold": true + }, + "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.s3.bytesDownloadedByFilterId:splitBy():sort(value(auto,descending)):limit(20)):limit(100):names" + ] + }, + { + "name": "BytesUploaded", + "tileType": "DATA_EXPLORER", + "configured": true, + "bounds": { + "top": 0, + "left": 304, + "width": 304, + "height": 304 + }, + "tileFilter": {}, + "isAutoRefreshDisabled": false, + "customName": "Data explorer results", + "queries": [ + { + "id": "A", + "metric": "ext:cloud.aws.s3.bytesUploadedByFilterId", + "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", + "showLabels": false + }, + "singleValueSettings": { + "showTrend": true, + "showSparkLine": true, + "linkTileColorToThreshold": true + }, + "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.s3.bytesUploadedByFilterId:splitBy():sort(value(auto,descending)):limit(20)):limit(100):names" + ] + }, + { + "name": "AllRequests", + "tileType": "DATA_EXPLORER", + "configured": true, + "bounds": { + "top": 0, + "left": 608, + "width": 304, + "height": 304 + }, + "tileFilter": {}, + "isAutoRefreshDisabled": false, + "customName": "Data explorer results", + "queries": [ + { + "id": "A", + "metric": "ext:cloud.aws.s3.allRequestsSumByFilterId", + "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", + "showLabels": false + }, + "singleValueSettings": { + "showTrend": true, + "showSparkLine": true, + "linkTileColorToThreshold": true + }, + "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.s3.allRequestsSumByFilterId:splitBy():sort(value(auto,descending)):limit(20)):limit(100):names" + ] + }, + { + "name": "4xxErrors", + "tileType": "DATA_EXPLORER", + "configured": true, + "bounds": { + "top": 0, + "left": 912, + "width": 304, + "height": 304 + }, + "tileFilter": {}, + "isAutoRefreshDisabled": false, + "customName": "Data explorer results", + "queries": [ + { + "id": "A", + "metric": "ext:cloud.aws.s3.4xxErrorsByFilterId", + "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", + "showLabels": false + }, + "singleValueSettings": { + "showTrend": true, + "showSparkLine": true, + "linkTileColorToThreshold": true + }, + "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.s3.\"4xxErrorsByFilterId\":splitBy():sort(value(auto,descending)):limit(20)):limit(100):names" + ] + }, + { + "name": "5xxErrors", + "tileType": "DATA_EXPLORER", + "configured": true, + "bounds": { + "top": 304, + "left": 0, + "width": 304, + "height": 304 + }, + "tileFilter": {}, + "isAutoRefreshDisabled": false, + "customName": "Data explorer results", + "queries": [ + { + "id": "A", + "metric": "ext:cloud.aws.s3.5xxErrorsByFilterId", + "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", + "showLabels": false + }, + "singleValueSettings": { + "showTrend": true, + "showSparkLine": true, + "linkTileColorToThreshold": true + }, + "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.s3.\"5xxErrorsByFilterId\":splitBy():sort(value(auto,descending)):limit(20)):limit(100):names" + ] + } + ] +}) +} \ No newline at end of file diff --git a/variables.tf b/variables.tf new file mode 100644 index 0000000..297b7b8 --- /dev/null +++ b/variables.tf @@ -0,0 +1,42 @@ + +variable "tenant_vars" { + type = any +} +variable "s3_dashbaord_name" { + type = string +} +variable "s3_owner_name" { + type = string +} +variable "s3_shared" { + type = string +} +variable "s3_preset" { + type = string +} +variable "rds_dashbaord_name" { + type = string +} +variable "rds_owner_name" { + type = string +} +variable "rds_shared" { + type = string +} +variable "rds_preset" { + type = string +} +variable "mks_dashbaord_name" { + type = string +} +variable "mks_owner_name" { + type = string +} +variable "mks_shared" { + type = string +} +variable "mks_preset" { + type = string +} + +