diff --git a/child/conf/netdata.conf b/child/conf/netdata.conf index a87310a..f3b2b8f 100755 --- a/child/conf/netdata.conf +++ b/child/conf/netdata.conf @@ -6,7 +6,3 @@ enabled = no [ml] enabled = no -[plugins] - otel = yes -[plugin:otel] - command options = --otel-endpoint 0.0.0.0:4317 --otel-logs-journal-dir /var/log/netdata/otel/v1 diff --git a/child/daemonset.yaml b/child/daemonset.yaml index 7033b54..16ca4d0 100755 --- a/child/daemonset.yaml +++ b/child/daemonset.yaml @@ -45,9 +45,9 @@ spec: - name: NETDATA_CLAIM_URL value: "https://api.netdata.cloud" - name: NETDATA_CLAIM_TOKEN - value: "CIlCwV6GawNWIfhrqMVmPAJixo_BSaGvwVbHKFOCQCHbYG5J8Ac0FDxKrObJ727F1dndg8J-v6apUhzGho6RIOlkrqJ_F7DKodjLqbsSWb7Ta-GSHkkuHcTXidxKxEo5RK0jiqU" + value: "REDACTED" - name: NETDATA_CLAIM_ROOMS - value: "e15a4f12-89d7-4d5b-b588-6658fa835473" + value: "REDACTED" - name: MY_POD_NAME valueFrom: fieldRef: @@ -104,9 +104,6 @@ spec: - name: configmap mountPath: /etc/netdata/go.d/web_log.conf subPath: web_log - - name: configmap - mountPath: /etc/netdata/otel.yaml - subPath: otel - name: configmap mountPath: /etc/netdata/netdata.conf subPath: netdata diff --git a/kustomization.yaml b/kustomization.yaml index 16d3ab7..3e53206 100755 --- a/kustomization.yaml +++ b/kustomization.yaml @@ -28,7 +28,6 @@ configMapGenerator: - web_log=child/conf/web_log.yaml - netdata=child/conf/netdata.conf - stream=child/conf/stream.conf - - otel=child/conf/otel.yaml - name: netdata-child-sd-config-map files: @@ -49,3 +48,4 @@ configMapGenerator: - health=parent/conf/health.conf - netdata=parent/conf/netdata.conf - stream=parent/conf/stream.conf + - otel=parent/conf/otel.yaml diff --git a/parent/conf/netdata.conf b/parent/conf/netdata.conf index f681eed..0e4bdae 100755 --- a/parent/conf/netdata.conf +++ b/parent/conf/netdata.conf @@ -16,3 +16,4 @@ proc = no idlejitter = no diskspace = no + otel = yes diff --git a/parent/conf/otel.yaml b/parent/conf/otel.yaml new file mode 100755 index 0000000..159552a --- /dev/null +++ b/parent/conf/otel.yaml @@ -0,0 +1,26 @@ +# OpenTelemetry Plugin Configuration (otel.plugin) +# Documented config surface only — see: +# https://learn.netdata.cloud/docs/collecting-metrics/opentelemetry/opentelemetry-metrics +# +# Any field can also be overridden via NETDATA_OTEL_ env vars +# (dots -> underscores, e.g. endpoint.tls_cert_path -> NETDATA_OTEL_ENDPOINT_TLS_CERT_PATH). +# +# NOTE: fields like logs.rotation/retention, remote_storage, and auth appeared in an +# earlier version of this config but are NOT present in the current documented schema. +# Left out here rather than guessed — reintroduce only once confirmed against the +# running agent version (e.g. via `otel.plugin --help` in the container, or Ask Nedi). + +endpoint: + # 0.0.0.0 so traffic arriving via the ClusterIP Service actually reaches the process + # (127.0.0.1 would only accept connections from inside the same network namespace). + path: "0.0.0.0:4317" + tls_cert_path: null + tls_key_path: null + tls_ca_cert_path: null + +metrics: + chart_configs_dir: /etc/netdata/otel.d/v1/metrics + interval_secs: 10 + grace_period_secs: 60 + expiry_duration_secs: 900 + max_new_charts_per_request: 100 diff --git a/parent/deployment.yaml b/parent/deployment.yaml index 8858b43..c8c8936 100755 --- a/parent/deployment.yaml +++ b/parent/deployment.yaml @@ -30,9 +30,9 @@ spec: - name: NETDATA_CLAIM_URL value: "https://api.netdata.cloud" - name: NETDATA_CLAIM_TOKEN - value: "CIlCwV6GawNWIfhrqMVmPAJixo_BSaGvwVbHKFOCQCHbYG5J8Ac0FDxKrObJ727F1dndg8J-v6apUhzGho6RIOlkrqJ_F7DKodjLqbsSWb7Ta-GSHkkuHcTXidxKxEo5RK0jiqU" + value: "REDACTED" - name: NETDATA_CLAIM_ROOMS - value: "e15a4f12-89d7-4d5b-b588-6658fa835473" + value: "REDACTED" - name: MY_POD_NAME valueFrom: fieldRef: @@ -47,6 +47,9 @@ spec: - name: http containerPort: 19999 protocol: TCP + - name: otel-grpc + containerPort: 4317 + protocol: TCP livenessProbe: exec: command: ["/usr/sbin/netdatacli", "ping"] @@ -78,6 +81,9 @@ spec: - name: configmap mountPath: /etc/netdata/stream.conf subPath: stream + - name: configmap + mountPath: /etc/netdata/otel.yaml + subPath: otel - name: database mountPath: /var/cache/netdata - name: alarms diff --git a/parent/service.yaml b/parent/service.yaml index f37f5cc..f9bee87 100755 --- a/parent/service.yaml +++ b/parent/service.yaml @@ -12,6 +12,10 @@ spec: targetPort: http protocol: TCP name: http + - port: 4317 + targetPort: otel-grpc + protocol: TCP + name: otel-grpc selector: app: netdata role: parent