diff --git a/modules/eks-monitoring/README.md b/modules/eks-monitoring/README.md index 9dae708..8534f52 100644 --- a/modules/eks-monitoring/README.md +++ b/modules/eks-monitoring/README.md @@ -113,7 +113,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": "0.0.0.0:4317",
"otlp_http_endpoint": "0.0.0.0: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": "localhost:4317",
"otlp_http_endpoint": "localhost:4318",
"send_batch_size": 50,
"timeout": "30s"
} | no |
## Outputs
diff --git a/modules/eks-monitoring/otel-config/templates/opentelemetrycollector.yaml b/modules/eks-monitoring/otel-config/templates/opentelemetrycollector.yaml
index 79fe550..2d05da6 100644
--- a/modules/eks-monitoring/otel-config/templates/opentelemetrycollector.yaml
+++ b/modules/eks-monitoring/otel-config/templates/opentelemetrycollector.yaml
@@ -36,9 +36,6 @@ spec:
global:
scrape_interval: {{ .Values.globalScrapeInterval }}
scrape_timeout: {{ .Values.globalScrapeTimeout }}
- external_labels:
- cluster: {{ .Values.ekscluster }}
- region: {{ .Values.region }}
scrape_configs:
- job_name: 'kubernetes-kubelet'
scrape_interval: {{ .Values.globalScrapeInterval }}
@@ -1775,6 +1772,8 @@ spec:
endpoint: {{ .Values.ampurl }}
auth:
authenticator: sigv4auth
+ resource_to_telemetry_conversion:
+ enabled: true
logging:
loglevel: warn
extensions:
@@ -1790,6 +1789,17 @@ spec:
batch/metrics:
timeout: 30s
send_batch_size: 500
+ attributes/metrics:
+ actions:
+ - key: cluster
+ action: upsert
+ value: {{ .Values.ekscluster }}
+ - key: region
+ action: upsert
+ value: {{ .Values.region }}
+ - key: account_id
+ action: upsert
+ value: {{ .Values.accountId }}
{{ if .Values.enableTracing }}
batch/traces:
timeout: {{ .Values.tracingTimeout }}
@@ -1800,7 +1810,7 @@ spec:
pipelines:
metrics:
receivers: [prometheus, otlp]
- processors: [batch/metrics]
+ processors: [batch/metrics, attributes/metrics]
exporters: [logging, prometheusremotewrite]
{{ if .Values.enableTracing }}
traces:
diff --git a/modules/eks-monitoring/variables.tf b/modules/eks-monitoring/variables.tf
index 2cd1b54..67f7fc4 100644
--- a/modules/eks-monitoring/variables.tf
+++ b/modules/eks-monitoring/variables.tf
@@ -210,8 +210,8 @@ variable "tracing_config" {
})
default = {
- otlp_grpc_endpoint = "0.0.0.0:4317"
- otlp_http_endpoint = "0.0.0.0:4318"
+ otlp_grpc_endpoint = "localhost:4317"
+ otlp_http_endpoint = "localhost:4318"
send_batch_size = 50
timeout = "30s"
}