Skip to content

Instantly share code, notes, and snippets.

@kennonkwok
Last active January 11, 2022 22:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kennonkwok/2a0f03565bacc9976ec0a00b2c259f47 to your computer and use it in GitHub Desktop.
Save kennonkwok/2a0f03565bacc9976ec0a00b2c259f47 to your computer and use it in GitHub Desktop.
---
apiVersion: v1
kind: ConfigMap
metadata:
name: opentelemetry
namespace: monitoring
data:
config.yaml: |-
receivers:
k8s_cluster:
auth_type: serviceAccount
kubeletstats:
collection_interval: 10s
auth_type: serviceAccount
endpoint: "${KUBE_NODE_IP}:10250"
insecure_skip_verify: true
extra_metadata_labels: [container.id, k8s.volume.type]
k8s_api_config:
auth_type: serviceAccount
otlp:
protocols:
grpc:
processors:
batch:
resourcedetection:
detectors: [system, env]
override: false
timeout: 10s
k8sattributes:
filter:
node_from_env_var: KUBE_NODE_NAME
resource:
attributes:
- key: k8s.node.name
action: insert
value: ${KUBE_NODE_NAME}
- key: metric_source
action: insert
value: kubernetes
- key: receiver
action: insert
value: k8scluster
exporters:
logging:
datadog:
api:
key: abcdefghijklmnopqrstuvwxyz
site: datadoghq.com
service:
pipelines:
metrics:
receivers: [otlp, kubeletstats, k8s_cluster]
processors: [resourcedetection, resource, batch, k8sattributes]
exporters: [logging,datadog]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment