Skip to content

Commit de8c123

Browse files
authored
eks-monitoring minor fixes (#182)
* Grafana URL should not be required at all times * Enable ADOT OTLP receiver on 0.0.0.0 * Fix variable name * Update helm release version
1 parent 905400a commit de8c123

File tree

6 files changed

+14
-13
lines changed

6 files changed

+14
-13
lines changed

examples/eks-multicluster/main.tf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ module "eks_cluster_2_monitoring" {
6868
managed_prometheus_workspace_id = module.aws_observability_accelerator.managed_prometheus_workspace_id
6969
managed_prometheus_workspace_endpoint = module.aws_observability_accelerator.managed_prometheus_workspace_endpoint
7070
managed_prometheus_workspace_region = module.aws_observability_accelerator.managed_prometheus_workspace_region
71-
grafana_url = module.aws_observability_accelerator.managed_grafana_workspace_endpoint
7271

7372
prometheus_config = {
7473
global_scrape_interval = "60s"

modules/eks-monitoring/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,13 +89,13 @@ See examples using this Terraform modules in the **Amazon EKS** section of [this
8989
| <a name="input_flux_kustomization_name"></a> [flux\_kustomization\_name](#input\_flux\_kustomization\_name) | Flux Kustomization name | `string` | `"grafana-dashboards-infrastructure"` | no |
9090
| <a name="input_flux_kustomization_path"></a> [flux\_kustomization\_path](#input\_flux\_kustomization\_path) | Flux Kustomization Path | `string` | `"./artifacts/grafana-operator-manifests/eks/infrastructure"` | no |
9191
| <a name="input_go_config"></a> [go\_config](#input\_go\_config) | Grafana Operator configuration | <pre>object({<br> create_namespace = bool<br> helm_chart = string<br> helm_name = string<br> k8s_namespace = string<br> helm_release_name = string<br> helm_chart_version = string<br> })</pre> | <pre>{<br> "create_namespace": true,<br> "helm_chart": "oci://ghcr.io/grafana-operator/helm-charts/grafana-operator",<br> "helm_chart_version": "v5.0.0-rc3",<br> "helm_name": "grafana-operator",<br> "helm_release_name": "grafana-operator",<br> "k8s_namespace": "grafana-operator"<br>}</pre> | no |
92-
| <a name="input_grafana_api_key"></a> [grafana\_api\_key](#input\_grafana\_api\_key) | Grafana API key for the Amazon Managed Grafana workspace | `string` | `""` | no |
92+
| <a name="input_grafana_api_key"></a> [grafana\_api\_key](#input\_grafana\_api\_key) | Grafana API key for the Amazon Managed Grafana workspace. Required if `enable_external_secrets = true` | `string` | `""` | no |
9393
| <a name="input_grafana_cluster_dashboard_url"></a> [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 |
9494
| <a name="input_grafana_kubelet_dashboard_url"></a> [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 |
9595
| <a name="input_grafana_namespace_workloads_dashboard_url"></a> [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 |
9696
| <a name="input_grafana_node_exporter_dashboard_url"></a> [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 |
9797
| <a name="input_grafana_nodes_dashboard_url"></a> [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 |
98-
| <a name="input_grafana_url"></a> [grafana\_url](#input\_grafana\_url) | Endpoint URL of Amazon Managed Grafana workspace | `string` | n/a | yes |
98+
| <a name="input_grafana_url"></a> [grafana\_url](#input\_grafana\_url) | Endpoint URL of Amazon Managed Grafana workspace. Required if `enable_grafana_operator = true` | `string` | `""` | no |
9999
| <a name="input_grafana_workloads_dashboard_url"></a> [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 |
100100
| <a name="input_helm_config"></a> [helm\_config](#input\_helm\_config) | Helm Config for Prometheus | `any` | `{}` | no |
101101
| <a name="input_irsa_iam_permissions_boundary"></a> [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
112112
| <a name="input_tags"></a> [tags](#input\_tags) | Additional tags (e.g. `map('BusinessUnit`,`XYZ`) | `map(string)` | `{}` | no |
113113
| <a name="input_target_secret_name"></a> [target\_secret\_name](#input\_target\_secret\_name) | Target secret in Kubernetes to store the Grafana API Key Secret | `string` | `"grafana-admin-credentials"` | no |
114114
| <a name="input_target_secret_namespace"></a> [target\_secret\_namespace](#input\_target\_secret\_namespace) | Target namespace of secret in Kubernetes to store the Grafana API Key Secret | `string` | `"grafana-operator"` | no |
115-
| <a name="input_tracing_config"></a> [tracing\_config](#input\_tracing\_config) | Configuration object for traces collection to AWS X-Ray | <pre>object({<br> otlp_grpc_endpoint = string<br> otlp_http_endpoint = string<br> send_batch_size = number<br> timeout = string<br> })</pre> | <pre>{<br> "otlp_grpc_endpoint": "localhost:4317",<br> "otlp_http_endpoint": "localhost:4318",<br> "send_batch_size": 50,<br> "timeout": "30s"<br>}</pre> | no |
115+
| <a name="input_tracing_config"></a> [tracing\_config](#input\_tracing\_config) | Configuration object for traces collection to AWS X-Ray | <pre>object({<br> otlp_grpc_endpoint = string<br> otlp_http_endpoint = string<br> send_batch_size = number<br> timeout = string<br> })</pre> | <pre>{<br> "otlp_grpc_endpoint": "0.0.0.0:4317",<br> "otlp_http_endpoint": "0.0.0.0:4318",<br> "send_batch_size": 50,<br> "timeout": "30s"<br>}</pre> | no |
116116

117117
## Outputs
118118

modules/eks-monitoring/main.tf

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ module "helm_addon" {
7878
{
7979
name = local.name
8080
chart = "${path.module}/otel-config"
81-
version = "0.4.0"
8281
namespace = local.namespace
8382
description = "ADOT helm Chart deployment configuration"
8483
},
@@ -143,7 +142,7 @@ module "helm_addon" {
143142
value = format("(%s.*)$", join(".*|", var.custom_metrics_config.dropped_series_prefixes))
144143
},
145144
{
146-
name = "enable_java"
145+
name = "enableJava"
147146
value = var.enable_java
148147
},
149148
{
@@ -155,7 +154,7 @@ module "helm_addon" {
155154
value = try(var.java_config.prometheus_metrics_endpoint, local.java_pattern_config.prometheus_metrics_endpoint)
156155
},
157156
{
158-
name = "enable_nginx"
157+
name = "enableNginx"
159158
value = var.enable_nginx
160159
},
161160
{

modules/eks-monitoring/otel-config/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ apiVersion: v2
22
name: opentelemetry
33
description: A Helm chart to install otel operator
44
type: application
5-
version: 0.2.0
6-
appVersion: v0.1.0
5+
version: 0.5.0
6+
appVersion: 0.5.0

modules/eks-monitoring/otel-config/values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
ampurl: ${amp_url}
22
region: ${region}
33
ekscluster: ${eks_cluster}
4+
accountId: ${account_id}
45

56
globalScrapeTimeout: ${global_scrape_timeout}
67
globalScrapeSampleLimit: ${global_scrape_sample_limit}
@@ -17,6 +18,7 @@ customMetricsDroppedSeriesPrefixes: ${custom_metrics_dropped_series_prefixes}
1718

1819
enableJava: ${enable_java}
1920
javaScrapeSampleLimit: ${java_scrape_sample_limit}
21+
javaPrometheusMetricsEndpoint: ${java_prometheus_metrics_endpoint}
2022

2123
enableNginx: ${enable_nginx}
2224
nginxScrapeSampleLimit: ${nginx_scrape_sample_limit}

modules/eks-monitoring/variables.tf

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,8 @@ variable "tracing_config" {
211211
})
212212

213213
default = {
214-
otlp_grpc_endpoint = "localhost:4317"
215-
otlp_http_endpoint = "localhost:4318"
214+
otlp_grpc_endpoint = "0.0.0.0:4317"
215+
otlp_http_endpoint = "0.0.0.0:4318"
216216
send_batch_size = 50
217217
timeout = "30s"
218218
}
@@ -384,14 +384,15 @@ variable "enable_external_secrets" {
384384
}
385385

386386
variable "grafana_api_key" {
387-
description = "Grafana API key for the Amazon Managed Grafana workspace"
387+
description = "Grafana API key for the Amazon Managed Grafana workspace. Required if `enable_external_secrets = true`"
388388
type = string
389389
default = ""
390390
}
391391

392392
variable "grafana_url" {
393-
description = "Endpoint URL of Amazon Managed Grafana workspace"
393+
description = "Endpoint URL of Amazon Managed Grafana workspace. Required if `enable_grafana_operator = true`"
394394
type = string
395+
default = ""
395396
}
396397

397398
variable "grafana_cluster_dashboard_url" {

0 commit comments

Comments
 (0)