Files
snow/apps/otel/otel.yaml
T
2026-01-09 10:01:57 +01:00

121 lines
2.9 KiB
YAML

apiVersion: opentelemetry.io/v1beta1
kind: OpenTelemetryCollector
metadata:
name: otel
spec:
mode: daemonset
env:
- name: CLICKHOUSE_PASSWORD
valueFrom:
secretKeyRef:
name: clickhouse-passwords
key: collector
volumes:
- name: htpasswd
secret:
secretName: otel-basicauth
items:
- key: .htpasswd
path: .htpasswd
volumeMounts:
- name: htpasswd
mountPath: .htpasswd
subPath: .htpasswd
config:
receivers:
hostmetrics:
scrapers:
cpu: {}
disk: {}
filesystem: {}
load: {}
memory: {}
network: {}
process: {}
processes: {}
paging: {}
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
http:
endpoint: 0.0.0.0:4318
auth:
authenticator: basicauth
kubeletstats:
collection_interval: 10s
auth_type: "serviceAccount"
endpoint: "${env:K8S_NODE_NAME}:10250"
insecure_skip_verify: true
metric_groups:
- node
- pod
- container
processors:
memory_limiter:
check_interval: 5s
limit_mib: 4000
spike_limit_mib: 500
batch:
send_batch_size: 2000
send_batch_max_size: 2000
timeout: 5s
k8sattributes:
extract:
metadata:
- k8s.namespace.name
- k8s.pod.name
- k8s.pod.start_time
- k8s.pod.uid
- k8s.deployment.name
- k8s.node.name
exporters:
debug:
verbosity: detailed
clickhouse:
endpoint: tcp://clickhouse-otel-cluster.otel.svc.cluster.local:9000?dial_timeout=10s&compress=lz4&async_insert=1
username: collector
password: ${env:CLICKHOUSE_PASSWORD}
ttl: 168h # a week
create_schema: true
timeout: 5s
database: otel
sending_queue:
queue_size: 1000
retry_on_failure:
enabled: true
initial_interval: 5s
max_interval: 30s
max_elapsed_time: 300s
extensions:
health_check:
endpoint: 0.0.0.0:13133
pprof:
endpoint: 0.0.0.0:1777
zpages:
endpoint: 0.0.0.0:55679
basicauth:
htpasswd:
file: .htpasswd
service:
extensions: [basicauth, health_check, pprof, zpages]
pipelines:
traces:
receivers: [otlp]
processors: [k8sattributes, memory_limiter, batch]
exporters: [clickhouse]
metrics:
receivers: [otlp, hostmetrics, kubeletstats]
processors: [k8sattributes, memory_limiter, batch]
exporters: [clickhouse]
logs:
receivers: [otlp]
processors: [k8sattributes, memory_limiter, batch]
exporters: [clickhouse]