From a3d4776abec11dfdd9fc6988630a60bc55eb5219 Mon Sep 17 00:00:00 2001 From: Ramesh Kumar Venkatraman Date: Tue, 30 Aug 2022 10:42:39 -0600 Subject: [PATCH 1/5] updated the readme files with examples, getting started, usage etc.., --- README.md | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) diff --git a/README.md b/README.md index b214640..236b395 100644 --- a/README.md +++ b/README.md @@ -2,26 +2,101 @@ Welcome to AWS Observability Accelerator for Terraform! +We will be leveraging EKS Blueprints (https://github.com/aws-ia/terraform-aws-eks-blueprints) repository to deploy the solution. EKS Blueprints is a collection of Terraform modules that aim to make it easier and faster for customers to adopt Amazon EKS and start deploying typical workloads. This repository has examples on how to use the existing EKS cluster, Managed Service for Prometheus and Amazon Managed Grafana workspaces as well as creating the brand new environment with all new resources with monitoring enabled right out of the box. + ## Getting Started +## Prerequisites: +First, ensure that you have installed the following tools locally. + +* Install Terraform (https://learn.hashicorp.com/tutorials/terraform/install-cli) +* Install Kubectl (https://docs.aws.amazon.com/eks/latest/userguide/install-kubectl.html) +* Install docker (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/create-container-image.html#:~:text=the%20Docker%20CLI.-,Installing%20Docker%20on%20Amazon%20Linux%202,-Create%20a%20Docker) +* AWS Command Line Interface (AWS CLI) version 2 (https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html) +* jq (https://stedolan.github.io/jq/download/) +* An AWS Account (https://aws.amazon.com/) +* Configure the credentials in AWS CLI (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html#:~:text=refreshes%20the%20credentials.-,Set%20and%20view%20configuration%20settings,-There%20are%20several) +* An existing Amazon Managed Grafana Workspace (https://aws.amazon.com/blogs/mt/amazon-managed-grafana-getting-started/) + +## Deployment Steps +Clone the repository that contains the EKS blueprints: + +`git clone https://github.com/aws-observability/terraform-aws-eks-blueprints.git` + + +# Generate Grafana API Key + +* Give admin access to the SSO user you set up when creating the Amazon Managed Grafana Workspace: +* In the AWS Console, navigate to Amazon Grafana. In the left navigation bar, click **All workspaces**, then click on the workspace name you are using for this example. +* Under **Authentication** within **AWS Single Sign-On (SSO)**, click **Configure users and user groups** +* Check the box next to the SSO user you created and click **Make admin** +* From the workspace in the AWS console, click on the `Grafana workspace` URL to open the workspace +* If you don't see the gear icon in the left navigation bar, log out and log back in. +* Click on the gear icon, then click on the **API keys** tab. +* Click **Add API key**, fill in the *Key name* field and select *Admin* as the Role. +* Copy your API key + ## Documentation +For complete project documentation, please visit our documentation (https://aws-ia.github.io/terraform-aws-eks-blueprints/) site. ## Examples +To view examples for how you can leverage EKS Blueprints, please see the examples (https://github.com/aws-observability/terraform-aws-observability-accelerator/tree/main/examples) directory. ## Usage +The below demonstrates how you can leverage AWS Observability Accelerator to enable monitoring to an existing EKS cluster, Managed Service for Prometheus and Amazon Managed Grafana workspaces. Configure the environment variables like below + +Change the directory + +`cd terraform-aws-observability-accelerator/examples/existing-cluster-with-base-and-infra/` + +Initialize terraform + +`terraform init` + +` +export TF_VAR_eks_cluster_id=xxx +export TF_VAR_managed_prometheus_workspace_id=ws-xxx #existing workspace id otherwise new workspace will be created +export TF_VAR_managed_grafana_workspace_id=g-xxx #existing workspace id otherwise new workspace will be created +export TF_VAR_grafana_api_key="xxx" #refer getting started section which shows the steps to create Grafana api key +` + +Deploy + +`terraform apply` + + +The code above will provision the following: + +* Enables the AWS EKS Add-on for ADOT operator (https://docs.aws.amazon.com/eks/latest/userguide/opentelemetry.html) to the existing Amazon EKS Cluster (specified in the environment variable) and deploys the ADOT collector with appropriate scrape configuration to ingest metrics to Amazon Managed Service for Prometheus +* Deploys kube-state-metrics (https://github.com/kubernetes/kube-state-metrics) to generate Prometheus format metrics based on the current state of the Kubernetes native resource +* Deploys Node_exporter (https://github.com/prometheus/node_exporter) to collect infrastructure metrics like CPU, Memory and Disk size etc +* Deploys rule files in the Amazon Managed Service for Prometheus Workspace(specified in the terraform variable file) containing rule groups with over 200 rules to gather metrics about Kubernetes native objects +* Configures the Amazon Managed Service for Prometheus workspace as a datasource in the Amazon Managed Grafana workspace +* Creates an Observability folder within the Amazon Managed Grafana workspace(specified in the terraform variable file) and deploys 25 grafana dashboards which visually transforms the metrics collected by Amazon Managed Service for Prometheus + ## Submodules +The root module calls into several submodules which provides support for deploying and integrating a number of external AWS services that can be used in concert with Amazon EKS. This includes Amazon Managed Prometheus, AWS OpenTelemetry Operator etc.., ## Motivation +Kubernetes is a powerful and extensible container orchestration technology that allows you to deploy and manage containerized applications at scale. The extensible nature of Kubernetes also allows you to use a wide range of popular open-source tools, commonly referred to as add-ons, in Kubernetes clusters. With such a large number of tooling and design choices available however, building a tailored EKS cluster that meets your application’s specific needs can take a significant amount of time. It involves integrating a wide range of open-source tools and AWS services and requires deep expertise in AWS and Kubernetes. + +AWS customers have asked for examples that demonstrate how to integrate the landscape of Kubernetes tools and make it easy for them to provision complete, opinionated EKS clusters that meet specific application requirements. Customers can use AWS Observability Accelerator to configure and deploy purpose built EKS clusters, and start onboarding workloads in days, rather than months. ## Support & Feedback +AWS Oservability Accelerator for Terraform is maintained by AWS Solution Architects. It is not part of an AWS service and support is provided best-effort by the EKS Blueprints community. + +To post feedback, submit feature ideas, or report bugs, please use the Issues (https://github.com/aws-observability/terraform-aws-observability-accelerator/issues) section of this GitHub repo. + +If you are interested in contributing to EKS Blueprints, see the Contribution (https://github.com/aws-observability/terraform-aws-observability-accelerator/blob/main/CONTRIBUTING.md) guide. + --- From cef141d25e2005a1c0d1e81f3423c3296c07a1e4 Mon Sep 17 00:00:00 2001 From: Ramesh Kumar Venkatraman Date: Tue, 30 Aug 2022 10:51:25 -0600 Subject: [PATCH 2/5] updated the language --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 236b395..c23aa0c 100644 --- a/README.md +++ b/README.md @@ -76,7 +76,7 @@ The code above will provision the following: * Deploys Node_exporter (https://github.com/prometheus/node_exporter) to collect infrastructure metrics like CPU, Memory and Disk size etc * Deploys rule files in the Amazon Managed Service for Prometheus Workspace(specified in the terraform variable file) containing rule groups with over 200 rules to gather metrics about Kubernetes native objects * Configures the Amazon Managed Service for Prometheus workspace as a datasource in the Amazon Managed Grafana workspace -* Creates an Observability folder within the Amazon Managed Grafana workspace(specified in the terraform variable file) and deploys 25 grafana dashboards which visually transforms the metrics collected by Amazon Managed Service for Prometheus +* Creates an Observability folder within the Amazon Managed Grafana workspace(specified in the terraform variable file) and deploys 25 grafana dashboards which visually displays the metrics collected by Amazon Managed Service for Prometheus ## Submodules From a00d82c05a06f54bbe9210e98d5fd7ba5c106cae Mon Sep 17 00:00:00 2001 From: Ramesh Kumar Venkatraman Date: Tue, 30 Aug 2022 11:25:24 -0600 Subject: [PATCH 3/5] updated the intro and removed prereq section --- README.md | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index c23aa0c..3ba6ebe 100644 --- a/README.md +++ b/README.md @@ -2,21 +2,17 @@ Welcome to AWS Observability Accelerator for Terraform! -We will be leveraging EKS Blueprints (https://github.com/aws-ia/terraform-aws-eks-blueprints) repository to deploy the solution. EKS Blueprints is a collection of Terraform modules that aim to make it easier and faster for customers to adopt Amazon EKS and start deploying typical workloads. This repository has examples on how to use the existing EKS cluster, Managed Service for Prometheus and Amazon Managed Grafana workspaces as well as creating the brand new environment with all new resources with monitoring enabled right out of the box. +The AWS Observability accelerator for Terraform is a set of modules to help you configure Observability for your Amazon EKS clusters with AWS Observability services. + +This project proposes a core module to bootstrap your cluster with the AWS Distro for OpenTelemetry (ADOT) Operator for EKS, Amazon Managed Service for Prometheus (AMP), Amazon Managed Grafana (AMG). Additionally we have a set of workloads modules to leverage curated ADOT collector configurations, Grafana dashboards, Prometheus rules and alerts. + +You can check our examples (https://github.com/aws-observability/terraform-aws-observability-accelerator/tree/main/examples) for different end-to-end integrations scenarios. + +We will be leveraging EKS Blueprints (https://github.com/aws-ia/terraform-aws-eks-blueprints) repository to deploy the solution. ## Getting Started -## Prerequisites: -First, ensure that you have installed the following tools locally. - -* Install Terraform (https://learn.hashicorp.com/tutorials/terraform/install-cli) -* Install Kubectl (https://docs.aws.amazon.com/eks/latest/userguide/install-kubectl.html) -* Install docker (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/create-container-image.html#:~:text=the%20Docker%20CLI.-,Installing%20Docker%20on%20Amazon%20Linux%202,-Create%20a%20Docker) -* AWS Command Line Interface (AWS CLI) version 2 (https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html) -* jq (https://stedolan.github.io/jq/download/) -* An AWS Account (https://aws.amazon.com/) -* Configure the credentials in AWS CLI (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html#:~:text=refreshes%20the%20credentials.-,Set%20and%20view%20configuration%20settings,-There%20are%20several) -* An existing Amazon Managed Grafana Workspace (https://aws.amazon.com/blogs/mt/amazon-managed-grafana-getting-started/) +Prerequisites for each of the examples are covered with in the examples directory. ## Deployment Steps Clone the repository that contains the EKS blueprints: @@ -39,11 +35,11 @@ Clone the repository that contains the EKS blueprints: ## Documentation -For complete project documentation, please visit our documentation (https://aws-ia.github.io/terraform-aws-eks-blueprints/) site. +For complete project documentation, please visit our documentation (https://github.com/aws-observability/terraform-aws-observability-accelerator/tree/main/docs) site. ## Examples -To view examples for how you can leverage EKS Blueprints, please see the examples (https://github.com/aws-observability/terraform-aws-observability-accelerator/tree/main/examples) directory. +To view examples for how you can leverage AWS Observability accelerator, please see the examples (https://github.com/aws-observability/terraform-aws-observability-accelerator/tree/main/examples) directory. ## Usage @@ -91,7 +87,7 @@ AWS customers have asked for examples that demonstrate how to integrate the land ## Support & Feedback -AWS Oservability Accelerator for Terraform is maintained by AWS Solution Architects. It is not part of an AWS service and support is provided best-effort by the EKS Blueprints community. +AWS Oservability Accelerator for Terraform is maintained by AWS Solution Architects. It is not part of an AWS service and support is provided best-effort by the AWS Oservability Accelerator community. To post feedback, submit feature ideas, or report bugs, please use the Issues (https://github.com/aws-observability/terraform-aws-observability-accelerator/issues) section of this GitHub repo. From f9a01270504e0c3c6fe765fd6b8128ffa2997026 Mon Sep 17 00:00:00 2001 From: Ramesh Kumar Venkatraman Date: Tue, 30 Aug 2022 14:01:15 -0600 Subject: [PATCH 4/5] updated the usage section to explain the base modules and how can it be customized to create managed prometheus and grafana --- README.md | 82 +++++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 71 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 3ba6ebe..7a5c4d1 100644 --- a/README.md +++ b/README.md @@ -45,22 +45,86 @@ To view examples for how you can leverage AWS Observability accelerator, please The below demonstrates how you can leverage AWS Observability Accelerator to enable monitoring to an existing EKS cluster, Managed Service for Prometheus and Amazon Managed Grafana workspaces. Configure the environment variables like below -Change the directory +### Base Module Snippet + +This base module allows you to customize whether you would like to use the existing Managed Service for Prometheus and Amazon Managed Grafana workspaces or you can update to create new workspaces. + +` +# deploys the base module +module "eks_observability_accelerator" { + # source = "aws-observability/terrarom-aws-observability-accelerator" + source = "../../" + + aws_region = var.aws_region + eks_cluster_id = var.eks_cluster_id + + # deploys AWS Distro for OpenTelemetry operator into the cluster + enable_amazon_eks_adot = true + + # reusing existing certificate manager? defaults to true + enable_cert_manager = true + + # creates a new AMP workspace, defaults to true + enable_managed_prometheus = false + + # reusing existing AMP -- needs data source for alerting rules + managed_prometheus_workspace_id = var.managed_prometheus_workspace_id + managed_prometheus_workspace_region = null # defaults to the current region, useful for cross region scenarios (same account) + + # sets up the AMP alert manager at the workspace level + enable_alertmanager = true + + # reusing existing Amazon Managed Grafana workspace + enable_managed_grafana = false + managed_grafana_workspace_id = var.managed_grafana_workspace_id + grafana_api_key = var.grafana_api_key + + tags = local.tags +} +` + +The values being passed either via environment variables or files would be used here to refer to the existing EKS cluster and its region. + +` + aws_region = var.aws_region + eks_cluster_id = var.eks_cluster_id +` + +By default, it tries to use the existing Managed Service for Prometheus and Amazon Managed Grafana workspaces however, you can customize them by toggling the below variables. + +` +# creates a new AMP workspace, defaults to true + enable_managed_prometheus = false + +... + +# reusing existing Amazon Managed Grafana workspace + enable_managed_grafana = false + +` + +You need to turn on `enable_managed_prometheus` and `enable_managed_grafana` variables to create a new managed workspaces for both Prometheus and Grafana. + +### Example on how to enable monitoring using existing EKS Cluster, Managed Service for Prometheus and Amazon Managed Grafana workspaces by setting up the necessary environment variables. + +1. Make sure to complete the prerequisites and clone the repository. + +2. Change the directory `cd terraform-aws-observability-accelerator/examples/existing-cluster-with-base-and-infra/` -Initialize terraform +3. Initialize terraform `terraform init` ` -export TF_VAR_eks_cluster_id=xxx -export TF_VAR_managed_prometheus_workspace_id=ws-xxx #existing workspace id otherwise new workspace will be created -export TF_VAR_managed_grafana_workspace_id=g-xxx #existing workspace id otherwise new workspace will be created -export TF_VAR_grafana_api_key="xxx" #refer getting started section which shows the steps to create Grafana api key +export TF_VAR_eks_cluster_id=xxx # existing EKS clusterid +export TF_VAR_managed_prometheus_workspace_id=ws-xxx #existing workspace id otherwise new workspace will be created +export TF_VAR_managed_grafana_workspace_id=g-xxx #existing workspace id otherwise new workspace will be created +export TF_VAR_grafana_api_key="xxx" #refer getting started section which shows the steps to create Grafana api key ` -Deploy +4. Deploy using environment variables `terraform apply` @@ -75,10 +139,6 @@ The code above will provision the following: * Creates an Observability folder within the Amazon Managed Grafana workspace(specified in the terraform variable file) and deploys 25 grafana dashboards which visually displays the metrics collected by Amazon Managed Service for Prometheus -## Submodules - -The root module calls into several submodules which provides support for deploying and integrating a number of external AWS services that can be used in concert with Amazon EKS. This includes Amazon Managed Prometheus, AWS OpenTelemetry Operator etc.., - ## Motivation Kubernetes is a powerful and extensible container orchestration technology that allows you to deploy and manage containerized applications at scale. The extensible nature of Kubernetes also allows you to use a wide range of popular open-source tools, commonly referred to as add-ons, in Kubernetes clusters. With such a large number of tooling and design choices available however, building a tailored EKS cluster that meets your application’s specific needs can take a significant amount of time. It involves integrating a wide range of open-source tools and AWS services and requires deep expertise in AWS and Kubernetes. From ada6d6c6995c9d34127e5cd39cea5045f3e24393 Mon Sep 17 00:00:00 2001 From: Rodrigue Koffi Date: Wed, 31 Aug 2022 12:39:44 +0200 Subject: [PATCH 5/5] Fix comments --- README.md | 179 ++++++++++++++++++++---------------------------------- 1 file changed, 66 insertions(+), 113 deletions(-) diff --git a/README.md b/README.md index 7a5c4d1..75548a8 100644 --- a/README.md +++ b/README.md @@ -1,142 +1,95 @@ # AWS Observability Accelerator for Terraform -Welcome to AWS Observability Accelerator for Terraform! +Welcome to the AWS Observability Accelerator for Terraform! -The AWS Observability accelerator for Terraform is a set of modules to help you configure Observability for your Amazon EKS clusters with AWS Observability services. +The AWS Observability accelerator for Terraform is a set of modules to help you +configure Observability for your Amazon EKS clusters with AWS Observability services. +This project proposes a core module to bootstrap your cluster with the AWS Distro for +OpenTelemetry (ADOT) Operator for EKS, Amazon Managed Service for Prometheus (AMP), +Amazon Managed Grafana (AMG). Additionally we have a set of workloads modules to +leverage curated ADOT collector configurations, Grafana dashboards, +Prometheus recording rules and alerts. -This project proposes a core module to bootstrap your cluster with the AWS Distro for OpenTelemetry (ADOT) Operator for EKS, Amazon Managed Service for Prometheus (AMP), Amazon Managed Grafana (AMG). Additionally we have a set of workloads modules to leverage curated ADOT collector configurations, Grafana dashboards, Prometheus rules and alerts. +You can check our [examples](./examples) for different end-to-end integrations scenarios. -You can check our examples (https://github.com/aws-observability/terraform-aws-observability-accelerator/tree/main/examples) for different end-to-end integrations scenarios. +We will be leveraging [EKS Blueprints](https://github.com/aws-ia/terraform-aws-eks-blueprints) +repository to deploy the solution. -We will be leveraging EKS Blueprints (https://github.com/aws-ia/terraform-aws-eks-blueprints) repository to deploy the solution. +## Example Usage -## Getting Started +The sections below demonstrate how you can leverage AWS Observability Accelerator +to enable monitoring to an existing EKS cluster. -Prerequisites for each of the examples are covered with in the examples directory. +### Base Module -## Deployment Steps -Clone the repository that contains the EKS blueprints: +The base module allows you to configure the AWS Observability services for your cluster and +the AWS Distro for OpenTelemetry (ADOT) Operator as the signals collection mechanism. -`git clone https://github.com/aws-observability/terraform-aws-eks-blueprints.git` +This is the minimum configuration to have a new Managed Grafana Workspace, Amazon Managed +Service for Prometheus Workspace, ADOT Operator deployed for you and ready to receive your +data. - -# Generate Grafana API Key - -* Give admin access to the SSO user you set up when creating the Amazon Managed Grafana Workspace: -* In the AWS Console, navigate to Amazon Grafana. In the left navigation bar, click **All workspaces**, then click on the workspace name you are using for this example. -* Under **Authentication** within **AWS Single Sign-On (SSO)**, click **Configure users and user groups** -* Check the box next to the SSO user you created and click **Make admin** -* From the workspace in the AWS console, click on the `Grafana workspace` URL to open the workspace -* If you don't see the gear icon in the left navigation bar, log out and log back in. -* Click on the gear icon, then click on the **API keys** tab. -* Click **Add API key**, fill in the *Key name* field and select *Admin* as the Role. -* Copy your API key - - -## Documentation - -For complete project documentation, please visit our documentation (https://github.com/aws-observability/terraform-aws-observability-accelerator/tree/main/docs) site. - -## Examples - -To view examples for how you can leverage AWS Observability accelerator, please see the examples (https://github.com/aws-observability/terraform-aws-observability-accelerator/tree/main/examples) directory. - -## Usage - -The below demonstrates how you can leverage AWS Observability Accelerator to enable monitoring to an existing EKS cluster, Managed Service for Prometheus and Amazon Managed Grafana workspaces. Configure the environment variables like below - -### Base Module Snippet - -This base module allows you to customize whether you would like to use the existing Managed Service for Prometheus and Amazon Managed Grafana workspaces or you can update to create new workspaces. - -` -# deploys the base module +```hcl module "eks_observability_accelerator" { - # source = "aws-observability/terrarom-aws-observability-accelerator" - source = "../../" - - aws_region = var.aws_region - eks_cluster_id = var.eks_cluster_id - - # deploys AWS Distro for OpenTelemetry operator into the cluster - enable_amazon_eks_adot = true - - # reusing existing certificate manager? defaults to true - enable_cert_manager = true - - # creates a new AMP workspace, defaults to true - enable_managed_prometheus = false - - # reusing existing AMP -- needs data source for alerting rules - managed_prometheus_workspace_id = var.managed_prometheus_workspace_id - managed_prometheus_workspace_region = null # defaults to the current region, useful for cross region scenarios (same account) - - # sets up the AMP alert manager at the workspace level - enable_alertmanager = true - - # reusing existing Amazon Managed Grafana workspace - enable_managed_grafana = false - managed_grafana_workspace_id = var.managed_grafana_workspace_id - grafana_api_key = var.grafana_api_key - - tags = local.tags + source = "aws-observability/terrarom-aws-observability-accelerator" + aws_region = "eu-west-1" + eks_cluster_id = "my-eks-cluster" } -` +``` -The values being passed either via environment variables or files would be used here to refer to the existing EKS cluster and its region. +You can optionally reuse existing Workspaces: -` - aws_region = var.aws_region - eks_cluster_id = var.eks_cluster_id -` +```hcl +module "eks_observability_accelerator" { + source = "aws-observability/terrarom-aws-observability-accelerator" + aws_region = "eu-west-1" + eks_cluster_id = "my-eks-cluster" -By default, it tries to use the existing Managed Service for Prometheus and Amazon Managed Grafana workspaces however, you can customize them by toggling the below variables. - -` -# creates a new AMP workspace, defaults to true + # prevents creation of a new AMP workspace enable_managed_prometheus = false -... + # reusing existing AMP + managed_prometheus_workspace_id = "ws-abcd123..." -# reusing existing Amazon Managed Grafana workspace + # prevents creation of a new AMG workspace enable_managed_grafana = false -` + managed_grafana_workspace_id = 'g-abcdef123' + grafana_api_key = var.grafana_api_key +} +``` -You need to turn on `enable_managed_prometheus` and `enable_managed_grafana` variables to create a new managed workspaces for both Prometheus and Grafana. +View all the configuration options in the module documentation below. -### Example on how to enable monitoring using existing EKS Cluster, Managed Service for Prometheus and Amazon Managed Grafana workspaces by setting up the necessary environment variables. +### Workload modules -1. Make sure to complete the prerequisites and clone the repository. - -2. Change the directory - -`cd terraform-aws-observability-accelerator/examples/existing-cluster-with-base-and-infra/` - -3. Initialize terraform - -`terraform init` - -` -export TF_VAR_eks_cluster_id=xxx # existing EKS clusterid -export TF_VAR_managed_prometheus_workspace_id=ws-xxx #existing workspace id otherwise new workspace will be created -export TF_VAR_managed_grafana_workspace_id=g-xxx #existing workspace id otherwise new workspace will be created -export TF_VAR_grafana_api_key="xxx" #refer getting started section which shows the steps to create Grafana api key -` - -4. Deploy using environment variables - -`terraform apply` +We provide also workloads modules which essentially provide curated +metrics collection, alerting rule and Grafana dashboards. -The code above will provision the following: +#### Infrastructure monitoring -* Enables the AWS EKS Add-on for ADOT operator (https://docs.aws.amazon.com/eks/latest/userguide/opentelemetry.html) to the existing Amazon EKS Cluster (specified in the environment variable) and deploys the ADOT collector with appropriate scrape configuration to ingest metrics to Amazon Managed Service for Prometheus -* Deploys kube-state-metrics (https://github.com/kubernetes/kube-state-metrics) to generate Prometheus format metrics based on the current state of the Kubernetes native resource -* Deploys Node_exporter (https://github.com/prometheus/node_exporter) to collect infrastructure metrics like CPU, Memory and Disk size etc -* Deploys rule files in the Amazon Managed Service for Prometheus Workspace(specified in the terraform variable file) containing rule groups with over 200 rules to gather metrics about Kubernetes native objects -* Configures the Amazon Managed Service for Prometheus workspace as a datasource in the Amazon Managed Grafana workspace -* Creates an Observability folder within the Amazon Managed Grafana workspace(specified in the terraform variable file) and deploys 25 grafana dashboards which visually displays the metrics collected by Amazon Managed Service for Prometheus + + +```hcl +module "workloads_infra" { + source = "aws-observability/terrarom-aws-observability-accelerator/workloads/infra" + + eks_cluster_id = module.eks_observability_accelerator.eks_cluster_id + + dashboards_folder_id = module.eks_observability_accelerator.grafana_dashboards_folder_id + managed_prometheus_workspace_id = module.eks_observability_accelerator.managed_prometheus_workspace_id + + managed_prometheus_workspace_endpoint = module.eks_observability_accelerator.managed_prometheus_workspace_endpoint + managed_prometheus_workspace_region = module.eks_observability_accelerator.managed_prometheus_workspace_region +} +``` + +Grafana dashboard + + + +To quickstart with a complete workflow, visit the [existing cluster with base and module example](./examples/existing-cluster-with-base-and-infra/) ## Motivation @@ -227,7 +180,7 @@ If you are interested in contributing to EKS Blueprints, see the Contribution (h | [managed\_prometheus\_workspace\_region](#output\_managed\_prometheus\_workspace\_region) | n/a | -## Security +## Contributing See [CONTRIBUTING](CONTRIBUTING.md#security-issue-notifications) for more information.