|
| 1 | +# daemonset.yaml |
| 2 | +mode: daemonset |
| 3 | + |
| 4 | +image: |
| 5 | + repository: otel/opentelemetry-collector-contrib |
| 6 | + tag: 0.123.0 |
| 7 | + |
| 8 | +# Required to use the kubeletstats cpu/memory utilization metrics |
| 9 | +clusterRole: |
| 10 | + create: true |
| 11 | + rules: |
| 12 | + - apiGroups: |
| 13 | + - '' |
| 14 | + resources: |
| 15 | + - nodes/proxy |
| 16 | + verbs: |
| 17 | + - get |
| 18 | + |
| 19 | +presets: |
| 20 | + logsCollection: |
| 21 | + enabled: true |
| 22 | + hostMetrics: |
| 23 | + enabled: true |
| 24 | + # Configures the Kubernetes Processor to add Kubernetes metadata. |
| 25 | + # Adds the k8sattributes processor to all the pipelines and adds the necessary rules to ClusterRole. |
| 26 | + # More Info: https://opentelemetry.io/docs/kubernetes/collector/components/#kubernetes-attributes-processor |
| 27 | + kubernetesAttributes: |
| 28 | + enabled: true |
| 29 | + # When enabled the processor will extra all labels for an associated pod and add them as resource attributes. |
| 30 | + # The label's exact name will be the key. |
| 31 | + extractAllPodLabels: true |
| 32 | + # When enabled the processor will extra all annotations for an associated pod and add them as resource attributes. |
| 33 | + # The annotation's exact name will be the key. |
| 34 | + extractAllPodAnnotations: true |
| 35 | + # Configures the collector to collect node, pod, and container metrics from the API server on a kubelet.. |
| 36 | + # Adds the kubeletstats receiver to the metrics pipeline and adds the necessary rules to ClusterRole. |
| 37 | + # More Info: https://opentelemetry.io/docs/kubernetes/collector/components/#kubeletstats-receiver |
| 38 | + kubeletMetrics: |
| 39 | + enabled: true |
| 40 | + |
| 41 | +extraEnvs: |
| 42 | + - name: HYPERDX_API_KEY |
| 43 | + valueFrom: |
| 44 | + secretKeyRef: |
| 45 | + name: hyperdx-secret |
| 46 | + key: HYPERDX_API_KEY |
| 47 | + optional: true |
| 48 | + - name: YOUR_OTEL_COLLECTOR_ENDPOINT |
| 49 | + valueFrom: |
| 50 | + configMapKeyRef: |
| 51 | + name: otel-config-vars |
| 52 | + key: YOUR_OTEL_COLLECTOR_ENDPOINT |
| 53 | + |
| 54 | +config: |
| 55 | + receivers: |
| 56 | + # Configures additional kubelet metrics |
| 57 | + kubeletstats: |
| 58 | + collection_interval: 20s |
| 59 | + auth_type: 'serviceAccount' |
| 60 | + endpoint: '${env:K8S_NODE_NAME}:10250' |
| 61 | + insecure_skip_verify: true |
| 62 | + metrics: |
| 63 | + k8s.pod.cpu_limit_utilization: |
| 64 | + enabled: true |
| 65 | + k8s.pod.cpu_request_utilization: |
| 66 | + enabled: true |
| 67 | + k8s.pod.memory_limit_utilization: |
| 68 | + enabled: true |
| 69 | + k8s.pod.memory_request_utilization: |
| 70 | + enabled: true |
| 71 | + k8s.pod.uptime: |
| 72 | + enabled: true |
| 73 | + k8s.node.uptime: |
| 74 | + enabled: true |
| 75 | + k8s.container.cpu_limit_utilization: |
| 76 | + enabled: true |
| 77 | + k8s.container.cpu_request_utilization: |
| 78 | + enabled: true |
| 79 | + k8s.container.memory_limit_utilization: |
| 80 | + enabled: true |
| 81 | + k8s.container.memory_request_utilization: |
| 82 | + enabled: true |
| 83 | + container.uptime: |
| 84 | + enabled: true |
| 85 | + |
| 86 | + exporters: |
| 87 | + otlphttp: |
| 88 | + endpoint: "${env:YOUR_OTEL_COLLECTOR_ENDPOINT}" |
| 89 | + compression: gzip |
| 90 | + headers: |
| 91 | + authorization: "${env:HYPERDX_API_KEY}" |
| 92 | + |
| 93 | + service: |
| 94 | + pipelines: |
| 95 | + logs: |
| 96 | + exporters: |
| 97 | + - otlphttp |
| 98 | + metrics: |
| 99 | + exporters: |
| 100 | + - otlphttp |
0 commit comments