• Stars
    star
    226
  • Rank 170,748 (Top 4 %)
  • Language HCL
  • License
    Apache License 2.0
  • Created almost 2 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Open source project to help accelerate and ease observability setup on AWS environments

AWS Observability Accelerator for Terraform

pre-commit plan-examples

Welcome to the AWS Observability Accelerator for Terraform!

The AWS Observability Accelerator for Terraform is a set of opinionated modules to help you set up observability for your AWS environments with AWS-managed observability services such as Amazon Managed Service for Prometheus, Amazon Managed Grafana, AWS Distro for OpenTelemetry (ADOT) and Amazon CloudWatch.

We provide curated metrics, logs, traces collection, alerting rules and Grafana dashboards for your EKS infrastructure, Java/JMX, NGINX based workloads and your custom applications.

You also can monitor your Amazon Managed Service for Prometheus workspaces ingestion, costs, active series with this module.

image

Documentation

To explore the complete project documentation, please visit our documentation site.

⚠️ Migration to v2.5

If you are migrating from earlier versions to v2.5, please follow this guide.

v2.5.0 removes the dependency to the Terraform Grafana provider in the EKS monitoring module. As Grafana Operator manages and syncs the Grafana contents, Terraform is not required anymore in this context.

However, if you migrate from earlier versions, you might leave some data orphans as the Grafana provider is dropped. Terraform will throw an error. We have released v2.5.0-rc.1 which removes all the Grafana resources provisioned by Terraform in the EKS context, without removing the provider configurations.

  • Step 1: migrate to v2.5.0-rc.1 and run apply
  • Step 2: migrate to v2.5.0 or above

Getting started

To quick start with a complete workflow and view Amazon EKS infrastructure dashboards, visit the Amazon EKS cluster monitoring documentation

How it works

The sections below demonstrate how you can leverage AWS Observability Accelerator to enable monitoring to an existing EKS cluster.

Base Module

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.

This is the minimum configuration to have a new Amazon Managed Service for Prometheus Workspace and ADOT Operator deployed for you and ready to receive your data. The base module serve as an anchor to the workload modules and cannot run on its own.

module "aws_observability_accelerator" {
  # use release tags and check for the latest versions
  # https://github.com/aws-observability/terraform-aws-observability-accelerator/releases
  source = "github.com/aws-observability/terraform-aws-observability-accelerator?ref=v2.1.0"

  aws_region     = "eu-west-1"
  eks_cluster_id = "my-eks-cluster"

  # As Grafana shares a different lifecycle, we recommend using an existing workspace.
  managed_grafana_workspace_id = var.managed_grafana_workspace_id
}

You can optionally reuse an existing Amazon Managed Servce for Prometheus Workspace:

module "aws_observability_accelerator" {
  # use release tags and check for the latest versions
  # https://github.com/aws-observability/terraform-aws-observability-accelerator/releases
  source = "github.com/aws-observability/terraform-aws-observability-accelerator?ref=v2.1.0"

  aws_region     = "eu-west-1"
  eks_cluster_id = "my-eks-cluster"

  # prevents creation of a new Amazon Managed Prometheus workspace
  enable_managed_prometheus = false

  # reusing existing Amazon Managed Prometheus Workspace
  managed_prometheus_workspace_id  = "ws-abcd123..."

  managed_grafana_workspace_id = "g-abcdef123"
}

View all the configuration options in the module documentation below.

Workload modules

Workloads modules are provided, which essentially provide curated metrics, logs, traces collection, alerting rules and Grafana dashboards.

Amazon EKS monitoring

module "eks_monitoring" {
  source = "github.com/aws-observability/terraform-aws-observability-accelerator//modules/eks-monitoring?ref=v2.1.0"

  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

  enable_logs = true
  enable_tracing = true
}

Grafana Dashboards

image

Check the the complete example

Motivation

To gain deep visibility into your workloads and environments, AWS proposes a set of secure, scalable, highly available, production-grade managed open source services such as Amazon Managed Service for Prometheus, Amazon Managed Grafana and Amazon OpenSearch.

AWS customers have asked for best-practices and guidance to collect metrics, logs and traces from their containerized applications and microservices with ease of deployment. Customers can use the AWS Observability Accelerator to configure their metrics and traces collection, leveraging AWS Distro for OpenTelemetry, to have opinionated dashboards and alerts available in only minutes.

Support & Feedback

AWS Observability 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 Observability Accelerator community.

To post feedback, submit feature ideas, or report bugs, please use the Issues section of this GitHub repo.

If you are interested in contributing, see the Contribution guide.


Requirements

Name Version
terraform >= 1.1.0
aws >= 4.0.0
awscc >= 0.24.0

Providers

Name Version
aws >= 4.0.0

Modules

No modules.

Resources

Name Type
aws_prometheus_alert_manager_definition.this resource
aws_prometheus_workspace.this resource
aws_grafana_workspace.this data source
aws_region.current data source

Inputs

Name Description Type Default Required
aws_region AWS Region string n/a yes
enable_alertmanager Creates Amazon Managed Service for Prometheus AlertManager for all workloads bool false no
enable_managed_prometheus Creates a new Amazon Managed Service for Prometheus Workspace bool true no
managed_grafana_workspace_id Amazon Managed Grafana Workspace ID string n/a yes
managed_prometheus_workspace_id Amazon Managed Service for Prometheus Workspace ID string "" no
managed_prometheus_workspace_region Region where Amazon Managed Service for Prometheus is deployed string null no
tags Additional tags (e.g. map('BusinessUnit,XYZ) map(string) {} no

Outputs

Name Description
aws_region AWS Region
managed_grafana_workspace_endpoint Amazon Managed Grafana workspace endpoint
managed_prometheus_workspace_endpoint Amazon Managed Prometheus workspace endpoint
managed_prometheus_workspace_id Amazon Managed Prometheus workspace ID
managed_prometheus_workspace_region Amazon Managed Prometheus workspace region

Contributing

See CONTRIBUTING for more information.

License

Apache-2.0 Licensed. See LICENSE.

More Repositories

1

aws-otel-collector

AWS Distro for OpenTelemetry Collector (see ADOT Roadmap at https://github.com/orgs/aws-observability/projects/4)
Go
523
star
2

observability-best-practices

Observability best practices on AWS
Go
173
star
3

cdk-aws-observability-accelerator

CDK AWS Observability Accelerator
TypeScript
120
star
4

aws-otel-lambda

AWS Distro for OpenTelemetry - AWS Lambda
HCL
119
star
5

aws-o11y-recipes

recipes for observability solutions at AWS
Go
112
star
6

aws-rum-web

Amazon CloudWatch RUM Web Client
TypeScript
103
star
7

aws-otel-community

Welcome to the AWS Distro for OpenTelemetry project. If you're using monitoring and observability tools for AWS products and services, this is a great place to ask questions, request features and network with other community members.
Java
75
star
8

aws-otel-java-instrumentation

AWS Distro for OpenTelemetry Java Instrumentation Library
Java
63
star
9

aws-otel-helm-charts

AWS Distro for OpenTelemetry (ADOT) Helm Charts
Mustache
44
star
10

aws-otel-js

AWS Distro for OpenTelemetry JavaScript SDK
JavaScript
35
star
11

aws-otel-go

AWS Distro for OpenTelemetry Go
Go
34
star
12

aws-otel-playground

Sample Application for the AWS X-Ray SDK with support for OpenTelemetry
Java
31
star
13

aws-otel-test-framework

AWS Distro for OpenTelemetry Test Framework
Java
27
star
14

aws-sigv4-proxy-admission-controller

This project creates a mutation admission controller that injects AWS SIGv4 proxy as a sidecar.
Go
26
star
15

amazon-managed-grafana-migrator

CLI migration utility to migrate Grafana content to Amazon Managed Grafana
Go
22
star
16

aws-otel-dotnet

AWS Distro for OpenTelemetry .NET
C#
21
star
17

aws-otel-python

AWS Distro for OpenTelemetry Python
Python
20
star
18

aws-otel-php

AWS Distro for OpenTelemetry PHP
PHP
15
star
19

amp-eks-iam

Tool providing easy IAM setup on EKS for Amazon Managed Service for Prometheus (AMP) users.
Go
11
star
20

aws-observability-accelerator

AWS Observability Accelerator
11
star
21

aws-otel-ruby

AWS Distro for OpenTelemetry Ruby
Ruby
8
star
22

amp-k8s-config-examples

Configurations for Prometheus including Kubernetes (k8s) Helm charts and Operators
7
star
23

application-signals-demo

Java
6
star