diff --git a/modules/eks-monitoring/README.md b/modules/eks-monitoring/README.md index 34deaf7e..417c393f 100644 --- a/modules/eks-monitoring/README.md +++ b/modules/eks-monitoring/README.md @@ -70,7 +70,7 @@ See examples using this Terraform modules in the **Amazon EKS** section of [this | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| | [adot\_loglevel](#input\_adot\_loglevel) | Verbosity level for ADOT collector logs. This accepts (detailed\|normal\|basic), see https://aws-otel.github.io/docs/components/misc-exporters for mor infos. | `string` | `"normal"` | no | -| [adothealth\_monitoring\_config](#input\_adothealth\_monitoring\_config) | Config object for ADOT health monitoring |
object({| `null` | no | +| [adothealth\_monitoring\_config](#input\_adothealth\_monitoring\_config) | Config object for ADOT health monitoring |
flux_gitrepository_name = string
flux_gitrepository_url = string
flux_gitrepository_branch = string
flux_kustomization_name = string
flux_kustomization_path = string
dashboards = object({
grafana_adothealth_dashboard_url = string
})
})
object({| `null` | no | | [apiserver\_monitoring\_config](#input\_apiserver\_monitoring\_config) | Config object for API server monitoring |
flux_gitrepository_name = string
flux_gitrepository_url = string
flux_gitrepository_branch = string
flux_kustomization_name = string
flux_kustomization_path = string
dashboards = object({
health = string
})
})
object({| `null` | no | | [custom\_metrics\_config](#input\_custom\_metrics\_config) | Configuration object to enable custom metrics collection |
flux_gitrepository_name = string
flux_gitrepository_url = string
flux_gitrepository_branch = string
flux_kustomization_name = string
flux_kustomization_path = string
dashboards = object({
basic = string
advanced = string
troubleshooting = string
})
})
map(object({| `null` | no | | [eks\_cluster\_id](#input\_eks\_cluster\_id) | EKS Cluster Id | `string` | n/a | yes | @@ -114,7 +114,7 @@ See examples using this Terraform modules in the **Amazon EKS** section of [this | [istio\_config](#input\_istio\_config) | Configuration object for ISTIO monitoring |
enableBasicAuth = bool
path = string
basicAuthUsername = string
basicAuthPassword = string
ports = string
droppedSeriesPrefixes = string
}))
object({| `null` | no | | [java\_config](#input\_java\_config) | Configuration object for Java/JMX monitoring |
enable_alerting_rules = bool
enable_recording_rules = bool
enable_dashboards = bool
scrape_sample_limit = number
flux_gitrepository_name = string
flux_gitrepository_url = string
flux_gitrepository_branch = string
flux_kustomization_name = string
flux_kustomization_path = string
managed_prometheus_workspace_id = string
prometheus_metrics_endpoint = string
dashboards = object({
cp = string
mesh = string
performance = string
service = string
})
})
object({| `null` | no | | [ksm\_config](#input\_ksm\_config) | Kube State metrics configuration |
enable_alerting_rules = bool
enable_recording_rules = bool
enable_dashboards = bool
scrape_sample_limit = number
flux_gitrepository_name = string
flux_gitrepository_url = string
flux_gitrepository_branch = string
flux_kustomization_name = string
flux_kustomization_path = string
grafana_dashboard_url = string
prometheus_metrics_endpoint = string
})
object({|
create_namespace = bool
k8s_namespace = string
helm_chart_name = string
helm_chart_version = string
helm_release_name = string
helm_repo_url = string
helm_settings = map(string)
helm_values = map(any)
scrape_interval = string
scrape_timeout = string
})
{| no | -| [kubeproxy\_monitoring\_config](#input\_kubeproxy\_monitoring\_config) | Config object for kube-proxy monitoring |
"create_namespace": true,
"helm_chart_name": "kube-state-metrics",
"helm_chart_version": "4.24.0",
"helm_release_name": "kube-state-metrics",
"helm_repo_url": "https://prometheus-community.github.io/helm-charts",
"helm_settings": {},
"helm_values": {},
"k8s_namespace": "kube-system",
"scrape_interval": "60s",
"scrape_timeout": "15s"
}
object({| `null` | no | +| [kubeproxy\_monitoring\_config](#input\_kubeproxy\_monitoring\_config) | Config object for kube-proxy monitoring |
flux_gitrepository_name = string
flux_gitrepository_url = string
flux_gitrepository_branch = string
flux_kustomization_name = string
flux_kustomization_path = string
dashboards = object({
grafana_kubeproxy_dashboard_url = string
})
})
object({| `null` | no | | [logs\_config](#input\_logs\_config) | Configuration object for logs collection |
flux_gitrepository_name = string
flux_gitrepository_url = string
flux_gitrepository_branch = string
flux_kustomization_name = string
flux_kustomization_path = string
dashboards = object({
default = string
})
})
object({|
cw_log_retention_days = number
})
{| no | | [managed\_prometheus\_workspace\_endpoint](#input\_managed\_prometheus\_workspace\_endpoint) | Amazon Managed Prometheus Workspace Endpoint | `string` | `""` | no | | [managed\_prometheus\_workspace\_id](#input\_managed\_prometheus\_workspace\_id) | Amazon Managed Prometheus Workspace ID | `string` | `null` | no | diff --git a/modules/eks-monitoring/locals.tf b/modules/eks-monitoring/locals.tf index 6233b4a3..3fd532d6 100644 --- a/modules/eks-monitoring/locals.tf +++ b/modules/eks-monitoring/locals.tf @@ -39,9 +39,9 @@ locals { scrape_sample_limit = 1000 - flux_gitrepository_name = "aws-observability-accelerator" - flux_gitrepository_url = "https://github.com/aws-observability/aws-observability-accelerator" - flux_gitrepository_branch = "v0.2.0" + flux_gitrepository_name = var.flux_gitrepository_name + flux_gitrepository_url = var.flux_gitrepository_url + flux_gitrepository_branch = var.flux_gitrepository_branch flux_kustomization_name = "grafana-dashboards-java" flux_kustomization_path = "./artifacts/grafana-operator-manifests/eks/java" @@ -60,9 +60,9 @@ locals { scrape_sample_limit = 1000 - flux_gitrepository_name = "aws-observability-accelerator" - flux_gitrepository_url = "https://github.com/aws-observability/aws-observability-accelerator" - flux_gitrepository_branch = "v0.2.0" + flux_gitrepository_name = var.flux_gitrepository_name + flux_gitrepository_url = var.flux_gitrepository_url + flux_gitrepository_branch = var.flux_gitrepository_branch flux_kustomization_name = "grafana-dashboards-nginx" flux_kustomization_path = "./artifacts/grafana-operator-manifests/eks/nginx" @@ -81,9 +81,9 @@ locals { scrape_sample_limit = 1000 - flux_gitrepository_name = "aws-observability-accelerator" - flux_gitrepository_url = "https://github.com/aws-observability/aws-observability-accelerator" - flux_gitrepository_branch = "v0.2.0" + flux_gitrepository_name = var.flux_gitrepository_name + flux_gitrepository_url = var.flux_gitrepository_url + flux_gitrepository_branch = var.flux_gitrepository_branch flux_kustomization_name = "grafana-dashboards-istio" flux_kustomization_path = "./artifacts/grafana-operator-manifests/eks/istio" @@ -100,42 +100,42 @@ locals { apiserver_monitoring_config = { # can be overriden by providing a config - flux_gitrepository_name = "aws-observability-accelerator" - flux_gitrepository_url = "https://github.com/aws-observability/aws-observability-accelerator" - flux_gitrepository_branch = "v0.2.0" - flux_kustomization_name = "grafana-dashboards-apiserver" - flux_kustomization_path = "./artifacts/grafana-operator-manifests/eks/apiserver" + flux_gitrepository_name = try(var.apiserver_monitoring_config.flux_gitrepository_name, var.flux_gitrepository_name) + flux_gitrepository_url = try(var.apiserver_monitoring_config.flux_gitrepository_url, var.flux_gitrepository_url) + flux_gitrepository_branch = try(var.apiserver_monitoring_config.flux_gitrepository_branch, var.flux_gitrepository_branch) + flux_kustomization_name = try(var.apiserver_monitoring_config.flux_kustomization_name, "grafana-dashboards-apiserver") + flux_kustomization_path = try(var.apiserver_monitoring_config.flux_kustomization_path, "./artifacts/grafana-operator-manifests/eks/apiserver") dashboards = { - basic = "https://raw.githubusercontent.com/aws-observability/aws-observability-accelerator/v0.2.0/artifacts/grafana-dashboards/eks/apiserver/apiserver-basic.json" - advanced = "https://raw.githubusercontent.com/aws-observability/aws-observability-accelerator/v0.2.0/artifacts/grafana-dashboards/eks/apiserver/apiserver-advanced.json" - troubleshooting = "https://raw.githubusercontent.com/aws-observability/aws-observability-accelerator/v0.2.0/artifacts/grafana-dashboards/eks/apiserver/apiserver-troubleshooting.json" + basic = try(var.apiserver_monitoring_config.dashboards.basic, "https://raw.githubusercontent.com/aws-observability/aws-observability-accelerator/v0.2.0/artifacts/grafana-dashboards/eks/apiserver/apiserver-basic.json") + advanced = try(var.apiserver_monitoring_config.dashboards.advanced, "https://raw.githubusercontent.com/aws-observability/aws-observability-accelerator/v0.2.0/artifacts/grafana-dashboards/eks/apiserver/apiserver-advanced.json") + troubleshooting = try(var.apiserver_monitoring_config.dashboards.troubleshooting, "https://raw.githubusercontent.com/aws-observability/aws-observability-accelerator/v0.2.0/artifacts/grafana-dashboards/eks/apiserver/apiserver-troubleshooting.json") } } adothealth_monitoring_config = { # can be overriden by providing a config - flux_gitrepository_name = "aws-observability-accelerator" - flux_gitrepository_url = "https://github.com/aws-observability/aws-observability-accelerator" - flux_gitrepository_branch = "v0.2.0" - flux_kustomization_name = "grafana-dashboards-adothealth" - flux_kustomization_path = "./artifacts/grafana-operator-manifests/eks/adot" + flux_gitrepository_name = try(var.adothealth_monitoring_config.flux_gitrepository_name, var.flux_gitrepository_name) + flux_gitrepository_url = try(var.adothealth_monitoring_config.flux_gitrepository_url, var.flux_gitrepository_url) + flux_gitrepository_branch = try(var.adothealth_monitoring_config.flux_gitrepository_branch, var.flux_gitrepository_branch) + flux_kustomization_name = try(var.adothealth_monitoring_config.flux_kustomization_name, "grafana-dashboards-adothealth") + flux_kustomization_path = try(var.adothealth_monitoring_config.flux_kustomization_path, "./artifacts/grafana-operator-manifests/eks/adot") dashboards = { - health = "https://raw.githubusercontent.com/aws-observability/aws-observability-accelerator/v0.2.0/artifacts/grafana-dashboards/adot/adothealth.json" + health = try(var.adothealth_monitoring_config.dashboards.health, "https://raw.githubusercontent.com/aws-observability/aws-observability-accelerator/v0.2.0/artifacts/grafana-dashboards/adot/adothealth.json") } } kubeproxy_monitoring_config = { # can be overriden by providing a config - flux_gitrepository_name = "aws-observability-accelerator" - flux_gitrepository_url = "https://github.com/aws-observability/aws-observability-accelerator" - flux_gitrepository_branch = "v0.2.0" - flux_kustomization_name = "grafana-dashboards-kubeproxy" - flux_kustomization_path = "./artifacts/grafana-operator-manifests/eks/kube-proxy" + flux_gitrepository_name = try(var.kubeproxy_monitoring_config.flux_gitrepository_name, var.flux_gitrepository_name) + flux_gitrepository_url = try(var.kubeproxy_monitoring_config.flux_gitrepository_url, var.flux_gitrepository_url) + flux_gitrepository_branch = try(var.kubeproxy_monitoring_config.flux_gitrepository_branch, var.flux_gitrepository_branch) + flux_kustomization_name = try(var.kubeproxy_monitoring_config.flux_kustomization_name, "grafana-dashboards-kubeproxy") + flux_kustomization_path = try(var.kubeproxy_monitoring_config.flux_kustomization_path, "./artifacts/grafana-operator-manifests/eks/kube-proxy") dashboards = { - default = "https://raw.githubusercontent.com/aws-observability/aws-observability-accelerator/v0.2.0/artifacts/grafana-dashboards/eks/kube-proxy/kube-proxy.json" + default = try(var.kubeproxy_monitoring_config.dashboards.default, "https://raw.githubusercontent.com/aws-observability/aws-observability-accelerator/v0.2.0/artifacts/grafana-dashboards/eks/kube-proxy/kube-proxy.json") } } } diff --git a/modules/eks-monitoring/variables.tf b/modules/eks-monitoring/variables.tf index 1b047f1e..a7a1db08 100644 --- a/modules/eks-monitoring/variables.tf +++ b/modules/eks-monitoring/variables.tf @@ -532,7 +532,7 @@ variable "adothealth_monitoring_config" { flux_kustomization_path = string dashboards = object({ - grafana_adothealth_dashboard_url = string + health = string }) }) @@ -550,7 +550,7 @@ variable "kubeproxy_monitoring_config" { flux_kustomization_path = string dashboards = object({ - grafana_kubeproxy_dashboard_url = string + default = string }) })
"cw_log_retention_days": 90
}