mirror of
https://github.com/storytold/terraform-aws-observability-accelerator.git
synced 2026-10-09 00:09:43 +00:00
Addition of EKS multi-cluster observability example (#155)
* Adding EKS multicluster observability example * EKS multicluster example - precommit fix * Corrected the path to an example * Made the multicluster example simpler * Pre-commit changes * Saved the images to Github and linked them in docs * Comments and language edits * Fix trailing spaces * Non-controversial naming and simpler variables * Added region to the data gathering * Formatting changes --------- Co-authored-by: Rodrigue Koffi <bonclay7@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
5b52c7b8e1
commit
b84e9b800f
@@ -0,0 +1,102 @@
|
||||
module "aws_observability_accelerator" {
|
||||
source = "../../../terraform-aws-observability-accelerator"
|
||||
aws_region = var.eks_cluster_1_region
|
||||
enable_managed_prometheus = false
|
||||
enable_alertmanager = true
|
||||
create_dashboard_folder = true
|
||||
create_prometheus_data_source = true
|
||||
grafana_api_key = var.grafana_api_key
|
||||
managed_prometheus_workspace_region = null
|
||||
managed_prometheus_workspace_id = var.managed_prometheus_workspace_id
|
||||
managed_grafana_workspace_id = var.managed_grafana_workspace_id
|
||||
|
||||
providers = {
|
||||
aws = aws.eks_cluster_1
|
||||
}
|
||||
}
|
||||
|
||||
module "eks_cluster_1_monitoring" {
|
||||
source = "../../../terraform-aws-observability-accelerator//modules/eks-monitoring"
|
||||
eks_cluster_id = var.eks_cluster_1_id
|
||||
enable_amazon_eks_adot = true
|
||||
enable_cert_manager = true
|
||||
enable_java = true
|
||||
|
||||
# This configuration section results in actions performed on AMG and AMP; and it needs to be done just once
|
||||
# And hence, this in performed in conjunction with the setup of the eks_cluster_1 EKS cluster
|
||||
enable_dashboards = true
|
||||
enable_alerting_rules = true
|
||||
enable_recording_rules = true
|
||||
|
||||
grafana_api_key = var.grafana_api_key
|
||||
dashboards_folder_id = module.aws_observability_accelerator.grafana_dashboards_folder_id
|
||||
managed_prometheus_workspace_id = module.aws_observability_accelerator.managed_prometheus_workspace_id
|
||||
managed_prometheus_workspace_endpoint = module.aws_observability_accelerator.managed_prometheus_workspace_endpoint
|
||||
managed_prometheus_workspace_region = module.aws_observability_accelerator.managed_prometheus_workspace_region
|
||||
|
||||
java_config = {
|
||||
enable_alerting_rules = true
|
||||
enable_recording_rules = true
|
||||
scrape_sample_limit = 1
|
||||
}
|
||||
|
||||
prometheus_config = {
|
||||
global_scrape_interval = "60s"
|
||||
global_scrape_timeout = "15s"
|
||||
scrape_sample_limit = 2000
|
||||
}
|
||||
|
||||
providers = {
|
||||
aws = aws.eks_cluster_1
|
||||
kubernetes = kubernetes.eks_cluster_1
|
||||
helm = helm.eks_cluster_1
|
||||
grafana = grafana
|
||||
}
|
||||
|
||||
depends_on = [
|
||||
module.aws_observability_accelerator
|
||||
]
|
||||
}
|
||||
|
||||
module "eks_cluster_2_monitoring" {
|
||||
source = "../../../terraform-aws-observability-accelerator//modules/eks-monitoring"
|
||||
eks_cluster_id = var.eks_cluster_2_id
|
||||
enable_amazon_eks_adot = true
|
||||
enable_cert_manager = true
|
||||
enable_java = true
|
||||
|
||||
# Since the following were enabled in conjunction with the set up of the eks_cluster_1 EKS cluster, we will skip
|
||||
# them with the eks_cluster_2 EKS cluster
|
||||
enable_dashboards = false
|
||||
enable_alerting_rules = false
|
||||
enable_recording_rules = false
|
||||
|
||||
grafana_api_key = var.grafana_api_key
|
||||
dashboards_folder_id = module.aws_observability_accelerator.grafana_dashboards_folder_id
|
||||
managed_prometheus_workspace_id = module.aws_observability_accelerator.managed_prometheus_workspace_id
|
||||
managed_prometheus_workspace_endpoint = module.aws_observability_accelerator.managed_prometheus_workspace_endpoint
|
||||
managed_prometheus_workspace_region = module.aws_observability_accelerator.managed_prometheus_workspace_region
|
||||
|
||||
java_config = {
|
||||
enable_alerting_rules = false # addressed while setting up the eks_cluster_1 EKS cluster
|
||||
enable_recording_rules = false # addressed while setting up the eks_cluster_1 EKS cluster
|
||||
scrape_sample_limit = 1
|
||||
}
|
||||
|
||||
prometheus_config = {
|
||||
global_scrape_interval = "60s"
|
||||
global_scrape_timeout = "15s"
|
||||
scrape_sample_limit = 2000
|
||||
}
|
||||
|
||||
providers = {
|
||||
aws = aws.eks_cluster_2
|
||||
kubernetes = kubernetes.eks_cluster_2
|
||||
helm = helm.eks_cluster_2
|
||||
grafana = grafana
|
||||
}
|
||||
|
||||
depends_on = [
|
||||
module.aws_observability_accelerator
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user