Quick Guide for OTel Agent on Kubernetes for Metrics
Use the following sample helm-values.yaml
file to configure the OpenTelemetry Collector to export logs, metrics, and traces to Kloudfuse. Ensure that you correctly set the protocol as either https
or http
, based on TLS being enabled or disabled.
image:
repository: "otel/opentelemetry-collector-contrib"
config:
exporters:
logging:
verbosity: basic
otlphttp:
tls:
insecure: true # add only if you're using insecure communication
metrics_endpoint: https://<REPLACE KFUSE ADDRESS>/ingester/otlp/metrics
extensions:
health_check: {}
memory_ballast:
size_in_percentage: 40
processors:
batch:
timeout: 10s
resourcedetection:
detectors:
- env
- eks
- ec2
- gcp
- aks
- azure
override: false
timeout: 2s
receivers:
otlp:
protocols:
grpc:
endpoint: ${env:MY_POD_IP}:4317
http:
cors:
allowed_origins:
- http://*
- https://*
endpoint: 0.0.0.0:4318
service:
extensions:
- health_check
pipelines:
metrics:
exporters:
- otlphttp
processors:
- batch
- resourcedetection
receivers:
- otlp
telemetry:
metrics:
address: ${MY_POD_IP}:8888
mode: daemonset
service:
enabled: true
nameOverride: otelcol
ports:
metrics:
enabled: true
otlp:
enabled: true
otlp-http:
enabled: true
presets:
kubernetesAttributes:
enabled: true
resources: {}
yaml