diff --git a/examples/eks-multicluster/main.tf b/examples/eks-multicluster/main.tf index 6d1f498..a458ada 100644 --- a/examples/eks-multicluster/main.tf +++ b/examples/eks-multicluster/main.tf @@ -68,7 +68,6 @@ module "eks_cluster_2_monitoring" { 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 - grafana_url = module.aws_observability_accelerator.managed_grafana_workspace_endpoint prometheus_config = { global_scrape_interval = "60s" diff --git a/modules/eks-monitoring/README.md b/modules/eks-monitoring/README.md index c697adc..ecc7efb 100644 --- a/modules/eks-monitoring/README.md +++ b/modules/eks-monitoring/README.md @@ -89,13 +89,13 @@ See examples using this Terraform modules in the **Amazon EKS** section of [this | [flux\_kustomization\_name](#input\_flux\_kustomization\_name) | Flux Kustomization name | `string` | `"grafana-dashboards-infrastructure"` | no | | [flux\_kustomization\_path](#input\_flux\_kustomization\_path) | Flux Kustomization Path | `string` | `"./artifacts/grafana-operator-manifests/eks/infrastructure"` | no | | [go\_config](#input\_go\_config) | Grafana Operator configuration |
object({
create_namespace = bool
helm_chart = string
helm_name = string
k8s_namespace = string
helm_release_name = string
helm_chart_version = string
}) | {
"create_namespace": true,
"helm_chart": "oci://ghcr.io/grafana-operator/helm-charts/grafana-operator",
"helm_chart_version": "v5.0.0-rc3",
"helm_name": "grafana-operator",
"helm_release_name": "grafana-operator",
"k8s_namespace": "grafana-operator"
} | no |
-| [grafana\_api\_key](#input\_grafana\_api\_key) | Grafana API key for the Amazon Managed Grafana workspace | `string` | `""` | no |
+| [grafana\_api\_key](#input\_grafana\_api\_key) | Grafana API key for the Amazon Managed Grafana workspace. Required if `enable_external_secrets = true` | `string` | `""` | no |
| [grafana\_cluster\_dashboard\_url](#input\_grafana\_cluster\_dashboard\_url) | Dashboard URL for Cluster Grafana Dashboard JSON | `string` | `"https://raw.githubusercontent.com/aws-observability/aws-observability-accelerator/main/artifacts/grafana-dashboards/eks/infrastructure/cluster.json"` | no |
| [grafana\_kubelet\_dashboard\_url](#input\_grafana\_kubelet\_dashboard\_url) | Dashboard URL for Kubelet Grafana Dashboard JSON | `string` | `"https://raw.githubusercontent.com/aws-observability/aws-observability-accelerator/main/artifacts/grafana-dashboards/eks/infrastructure/kubelet.json"` | no |
| [grafana\_namespace\_workloads\_dashboard\_url](#input\_grafana\_namespace\_workloads\_dashboard\_url) | Dashboard URL for Namespace Workloads Grafana Dashboard JSON | `string` | `"https://raw.githubusercontent.com/aws-observability/aws-observability-accelerator/main/artifacts/grafana-dashboards/eks/infrastructure/namespace-workloads.json"` | no |
| [grafana\_node\_exporter\_dashboard\_url](#input\_grafana\_node\_exporter\_dashboard\_url) | Dashboard URL for Node Exporter Grafana Dashboard JSON | `string` | `"https://raw.githubusercontent.com/aws-observability/aws-observability-accelerator/main/artifacts/grafana-dashboards/eks/infrastructure/nodeexporter-nodes.json"` | no |
| [grafana\_nodes\_dashboard\_url](#input\_grafana\_nodes\_dashboard\_url) | Dashboard URL for Nodes Grafana Dashboard JSON | `string` | `"https://raw.githubusercontent.com/aws-observability/aws-observability-accelerator/main/artifacts/grafana-dashboards/eks/infrastructure/nodes.json"` | no |
-| [grafana\_url](#input\_grafana\_url) | Endpoint URL of Amazon Managed Grafana workspace | `string` | n/a | yes |
+| [grafana\_url](#input\_grafana\_url) | Endpoint URL of Amazon Managed Grafana workspace. Required if `enable_grafana_operator = true` | `string` | `""` | no |
| [grafana\_workloads\_dashboard\_url](#input\_grafana\_workloads\_dashboard\_url) | Dashboard URL for Workloads Grafana Dashboard JSON | `string` | `"https://raw.githubusercontent.com/aws-observability/aws-observability-accelerator/main/artifacts/grafana-dashboards/eks/infrastructure/workloads.json"` | no |
| [helm\_config](#input\_helm\_config) | Helm Config for Prometheus | `any` | `{}` | no |
| [irsa\_iam\_permissions\_boundary](#input\_irsa\_iam\_permissions\_boundary) | IAM permissions boundary for IRSA roles | `string` | `null` | no |
@@ -112,7 +112,7 @@ See examples using this Terraform modules in the **Amazon EKS** section of [this
| [tags](#input\_tags) | Additional tags (e.g. `map('BusinessUnit`,`XYZ`) | `map(string)` | `{}` | no |
| [target\_secret\_name](#input\_target\_secret\_name) | Target secret in Kubernetes to store the Grafana API Key Secret | `string` | `"grafana-admin-credentials"` | no |
| [target\_secret\_namespace](#input\_target\_secret\_namespace) | Target namespace of secret in Kubernetes to store the Grafana API Key Secret | `string` | `"grafana-operator"` | no |
-| [tracing\_config](#input\_tracing\_config) | Configuration object for traces collection to AWS X-Ray | object({
otlp_grpc_endpoint = string
otlp_http_endpoint = string
send_batch_size = number
timeout = string
}) | {
"otlp_grpc_endpoint": "localhost:4317",
"otlp_http_endpoint": "localhost:4318",
"send_batch_size": 50,
"timeout": "30s"
} | no |
+| [tracing\_config](#input\_tracing\_config) | Configuration object for traces collection to AWS X-Ray | object({
otlp_grpc_endpoint = string
otlp_http_endpoint = string
send_batch_size = number
timeout = string
}) | {
"otlp_grpc_endpoint": "0.0.0.0:4317",
"otlp_http_endpoint": "0.0.0.0:4318",
"send_batch_size": 50,
"timeout": "30s"
} | no |
## Outputs
diff --git a/modules/eks-monitoring/main.tf b/modules/eks-monitoring/main.tf
index 763e8d8..0b37a9a 100644
--- a/modules/eks-monitoring/main.tf
+++ b/modules/eks-monitoring/main.tf
@@ -78,7 +78,6 @@ module "helm_addon" {
{
name = local.name
chart = "${path.module}/otel-config"
- version = "0.4.0"
namespace = local.namespace
description = "ADOT helm Chart deployment configuration"
},
@@ -143,7 +142,7 @@ module "helm_addon" {
value = format("(%s.*)$", join(".*|", var.custom_metrics_config.dropped_series_prefixes))
},
{
- name = "enable_java"
+ name = "enableJava"
value = var.enable_java
},
{
@@ -155,7 +154,7 @@ module "helm_addon" {
value = try(var.java_config.prometheus_metrics_endpoint, local.java_pattern_config.prometheus_metrics_endpoint)
},
{
- name = "enable_nginx"
+ name = "enableNginx"
value = var.enable_nginx
},
{
diff --git a/modules/eks-monitoring/otel-config/Chart.yaml b/modules/eks-monitoring/otel-config/Chart.yaml
index 94c1fbd..f7bee2a 100644
--- a/modules/eks-monitoring/otel-config/Chart.yaml
+++ b/modules/eks-monitoring/otel-config/Chart.yaml
@@ -2,5 +2,5 @@ apiVersion: v2
name: opentelemetry
description: A Helm chart to install otel operator
type: application
-version: 0.2.0
-appVersion: v0.1.0
+version: 0.5.0
+appVersion: 0.5.0
diff --git a/modules/eks-monitoring/otel-config/values.yaml b/modules/eks-monitoring/otel-config/values.yaml
index 1bc7c5e..6e4897d 100644
--- a/modules/eks-monitoring/otel-config/values.yaml
+++ b/modules/eks-monitoring/otel-config/values.yaml
@@ -1,6 +1,7 @@
ampurl: ${amp_url}
region: ${region}
ekscluster: ${eks_cluster}
+accountId: ${account_id}
globalScrapeTimeout: ${global_scrape_timeout}
globalScrapeSampleLimit: ${global_scrape_sample_limit}
@@ -17,6 +18,7 @@ customMetricsDroppedSeriesPrefixes: ${custom_metrics_dropped_series_prefixes}
enableJava: ${enable_java}
javaScrapeSampleLimit: ${java_scrape_sample_limit}
+javaPrometheusMetricsEndpoint: ${java_prometheus_metrics_endpoint}
enableNginx: ${enable_nginx}
nginxScrapeSampleLimit: ${nginx_scrape_sample_limit}
diff --git a/modules/eks-monitoring/variables.tf b/modules/eks-monitoring/variables.tf
index 74c425f..f242c3a 100644
--- a/modules/eks-monitoring/variables.tf
+++ b/modules/eks-monitoring/variables.tf
@@ -211,8 +211,8 @@ variable "tracing_config" {
})
default = {
- otlp_grpc_endpoint = "localhost:4317"
- otlp_http_endpoint = "localhost:4318"
+ otlp_grpc_endpoint = "0.0.0.0:4317"
+ otlp_http_endpoint = "0.0.0.0:4318"
send_batch_size = 50
timeout = "30s"
}
@@ -384,14 +384,15 @@ variable "enable_external_secrets" {
}
variable "grafana_api_key" {
- description = "Grafana API key for the Amazon Managed Grafana workspace"
+ description = "Grafana API key for the Amazon Managed Grafana workspace. Required if `enable_external_secrets = true`"
type = string
default = ""
}
variable "grafana_url" {
- description = "Endpoint URL of Amazon Managed Grafana workspace"
+ description = "Endpoint URL of Amazon Managed Grafana workspace. Required if `enable_grafana_operator = true`"
type = string
+ default = ""
}
variable "grafana_cluster_dashboard_url" {