123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445 |
- # Default values for opentelemetry-collector.
- # This is a YAML-formatted file.
- # Declare variables to be passed into your templates.
- nameOverride: ""
- fullnameOverride: ""
- # Valid values are "daemonset", "deployment", and "statefulset".
- mode: "daemonset"
- presets:
- logsCollection:
- enabled: false
- includeCollectorLogs: false
- # Enabling this writes checkpoints in /var/lib/otelcol/ host directory.
- # Note this changes collector's user to root, so that it can write to host directory.
- storeCheckpoints: false
- # Configures the collector to collect host metrics.
- # Adds the hostmetrics receiver to the metrics pipeline
- # and adds the necessary volumes and volume mounts.
- # Best used with mode = daemonset.
- hostMetrics:
- enabled: false
- # Configures the Kubernetes Processor to add Kubernetes metadata.
- # Adds the k8sattributes processor to all the pipelines
- # and adds the necessary rules to ClusteRole.
- # Best used with mode = daemonset.
- kubernetesAttributes:
- enabled: true
- # Configures the Kubernetes Cluster Receiver to collect cluster-level metrics.
- # Adds the k8s_cluster receiver to the metrics pipeline
- # and adds the necessary rules to ClusteRole.
- # Best used with mode = deployment or statefulset.
- clusterMetrics:
- enabled: false
- # Configures the collector to collect Kubelet metrics.
- # Adds the kubeletstats receiver to the metrics pipeline
- # and adds the necessary rules to ClusteRole.
- # Best used with mode = daemonset.
- kubeletMetrics:
- enabled: false
- configMap:
- # Specifies whether a configMap should be created (true by default)
- create: true
- # Base collector configuration.
- # Supports templating. To escape existing instances of {{ }}, use {{` <original content> `}}.
- # For example, {{ REDACTED_EMAIL }} becomes {{` {{ REDACTED_EMAIL }} `}}.
- config:
- exporters:
- loki:
- endpoint: http://loki-loki-distributed-gateway.observe.svc.cluster.local:80/loki/api/v1/push
- otlphttp/deepflow:
- traces_endpoint: "http://deepflow-agent.deepflow/api/v1/otel/trace"
- tls:
- insecure: true
- retry_on_failure:
- enabled: true
- otlphttp/uptrace:
- #endpoint: http://39.106.74.84:34318
- endpoint: http://uptrace.observe.svc.cluster.local:14318
- tls:
- insecure: true
- headers:
- # uptrace-dsn: 'http://project2_secret_token@39.106.74.84:34318/2'
- uptrace-dsn: 'http://project2_secret_token@uptrace.observe.svc.cluster.local:14318/2'
-
- debug:
- verbosity: detailed
- otlp:
- endpoint: "tempo-distributor.observe.svc.cluster.local:4317"
- tls:
- insecure: true
- prometheus:
- endpoint: "0.0.0.0:8889"
- clickhouse:
- endpoint: "tcp://clickhouse-headless.observe.svc.cluster.local:9000?dial_timeout=10s&compress=lz4"
- database: otel
- username: default
- password: "cecf@cestong.com"
- ttl: 240h
- #logs_table: otel_logs
- #traces_table: otel_traces
- #metrics_table: otel_metrics
- timeout: 5s
- retry_on_failure:
- enabled: true
- initial_interval: 5s
- max_interval: 30s
- max_elapsed_time: 300s
- kafka/proto:
- brokers:
- - kafka-headless.observe.svc.cluster.local:9092
- protocol_version: 2.0.0
- encoding: otlp_proto
- topic: otelproto
- timeout: 5s
- retry_on_failure:
- enabled: true
- initial_interval: 5s
- max_interval: 30s
- max_elapsed_time: 120s
- producer:
- max_message_bytes: 1000000
- required_acks: 1
- compression: lz4
- sending_queue:
- enabled: false
- kafka:
- brokers:
- - kafka-headless.observe.svc.cluster.local:9092
- #- kafka-broker.ob.svc.cluster.local:9092
- protocol_version: 2.0.0
- encoding: otlp_json
- topic: otel
- timeout: 5s
- retry_on_failure:
- enabled: true
- initial_interval: 5s
- max_interval: 30s
- max_elapsed_time: 120s
- producer:
- max_message_bytes: 1000000
- required_acks: 1
- compression: lz4
- flush_max_messages: 5000
- sending_queue:
- enabled: false
- extensions:
- health_check:
- endpoint: "0.0.0.0:13133"
- processors:
- filter/ottl:
- error_mode: ignore
- logs:
- log_record:
- - 'severity_number < SEVERITY_NUMBER_WARN'
- #transform:
- # error_mode: ignore
- # log_statements:
- # - context: log
- # statements:
- # - set(severity_number, SEVERITY_NUMBER_INFO) where IsString(body) and IsMatch(body, "(\\s|\\[)INFO(\\s|\\])")
- # - set(severity_number, SEVERITY_NUMBER_WARN) where IsString(body) and IsMatch(body, "(\\s|\\[)WARN(\\s|\\])")
- # - set(severity_number, SEVERITY_NUMBER_ERROR) where IsString(body) and IsMatch(body, "(\\s|\\[)ERROR(\\s|\\])")
- # - set(severity_number, SEVERITY_NUMBER_INFO) where severity_number == SEVERITY_NUMBER_UNSPECIFIED
- attributes:
- actions:
- - action: insert
- key: loki.attribute.labels
- value: log.iostream
-
- resource:
- attributes:
- - action: insert
- key: loki.resource.labels
- value: k8s.container.name, k8s.container.restart_count, k8s.deployment.name, k8s.namespace.name, k8s.pod.name, k8s.node.name, k8s.daemonset.name, service.name, k8s.pod.uid
- batch:
- send_batch_max_size: 1000
- send_batch_size: 500
- timeout: 5s
- # If set to null, will be overridden with values based on k8s resource limits
- memory_limiter:
- check_interval: 1s
- limit_percentage: 80
- spike_limit_percentage: 30
- receivers:
- kafka:
- brokers: kafka-headless.observe.svc.cluster.local:9092
- protocol_version: 2.0.0
- topic: otel_agent
- encoding: otlp_proto
- otlp:
- protocols:
- grpc:
- endpoint: ${MY_POD_IP}:4317
- http:
- endpoint: ${MY_POD_IP}:4318
- prometheus:
- config:
- scrape_configs:
- - job_name: opentelemetry-collector
- scrape_interval: 10s
- static_configs:
- - targets:
- - ${MY_POD_IP}:8888
- service:
- telemetry:
- metrics:
- address: ${MY_POD_IP}:8888
- logs:
- level: "info"
- extensions:
- - health_check
- pipelines:
- metrics:
- receivers:
- - otlp
- - prometheus
- processors:
- - memory_limiter
- exporters:
- - prometheus
- #- clickhouse
- logs:
- exporters:
- - clickhouse
- processors:
- #- filter/ottl
- - memory_limiter
- - batch
- receivers:
- - otlp
- traces:
- exporters:
- - kafka/proto
- processors:
- - memory_limiter
- #- batch
- receivers:
- - otlp
- - kafka
- image:
- repository: otel/opentelemetry-collector-contrib
- #repository: reg.cestong.com.cn/cecf/obcol
- pullPolicy: Always
- tag: "0.108.0"
- digest: ""
- imagePullSecrets: []
- # OpenTelemetry Collector executable
- command:
- name: ""
- extraArgs: []
- serviceAccount:
- # Specifies whether a service account should be created
- create: true
- # Annotations to add to the service account
- annotations: {}
- # The name of the service account to use.
- # If not set and create is true, a name is generated using the fullname template
- name: ""
- clusterRole:
- # Specifies whether a clusterRole should be created
- # Some presets also trigger the creation of a cluster role and cluster role binding.
- # If using one of those presets, this field is no-op.
- create: false
- # Annotations to add to the clusterRole
- # Can be used in combination with presets that create a cluster role.
- annotations: {}
- # The name of the clusterRole to use.
- # If not set a name is generated using the fullname template
- # Can be used in combination with presets that create a cluster role.
- name: ""
- # A set of rules as documented here : https://kubernetes.io/docs/reference/access-authn-authz/rbac/
- # Can be used in combination with presets that create a cluster role to add additional rules.
- rules: []
- # - apiGroups:
- # - ''
- # resources:
- # - 'pods'
- # - 'nodes'
- # verbs:
- # - 'get'
- # - 'list'
- # - 'watch'
- clusterRoleBinding:
- annotations: {}
- name: ""
- podSecurityContext: {}
- securityContext: {}
- nodeSelector: {}
- tolerations: []
- affinity: {}
- topologySpreadConstraints: {}
- priorityClassName: ""
- extraEnvs: []
- extraVolumes: []
- extraVolumeMounts: []
- ports:
- health:
- enabled: true
- containerPort: 13133
- servicePort: 13133
- protocol: TCP
- otlp:
- enabled: true
- containerPort: 4317
- servicePort: 4317
- #hostPort: 4317
- protocol: TCP
- nodePort: 30317
- appProtocol: grpc
- otlp-http:
- enabled: true
- containerPort: 4318
- servicePort: 4318
- #hostPort: 4318
- # nodePort: 30318
- protocol: TCP
- prome:
- enabled: true
- containerPort: 8889
- servicePort: 8889
- protocol: TCP
- metrics:
- enabled: true
- containerPort: 8888
- servicePort: 8888
- protocol: TCP
- # Resource limits & requests. Update according to your own use case as these values might be too low for a typical deployment.
- resources:
- limits:
- cpu: 4
- memory: 4096Mi
- podAnnotations:
- prometheus.io/scrape: "true"
- prometheus.io/path: /metrics
- prometheus.io/port: "8889"
- podLabels: {}
- # Host networking requested for this pod. Use the host's network namespace.
- hostNetwork: false
- # Pod DNS policy ClusterFirst, ClusterFirstWithHostNet, None, Default, None
- dnsPolicy: ""
- # only used with deployment mode
- replicaCount: 1
- # only used with deployment mode
- revisionHistoryLimit: 10
- annotations: {}
- # List of extra sidecars to add
- extraContainers: []
- # extraContainers:
- # - name: test
- # command:
- # - cp
- # args:
- # - /bin/sleep
- # - /test/sleep
- # image: busybox:latest
- # volumeMounts:
- # - name: test
- # mountPath: /test
- # List of init container specs, e.g. for copying a binary to be executed as a lifecycle hook.
- # Another usage of init containers is e.g. initializing filesystem permissions to the OTLP Collector user `10001` in case you are using persistence and the volume is producing a permission denied error for the OTLP Collector container.
- initContainers: []
- lifecycleHooks: {}
- service:
- type: NodePort
- annotations: {}
- ingress:
- enabled: true
- annotations:
- nginx.ingress.kubernetes.io/cors-allow-origin: "http://otel-demo.cestong.com.cn,http://localhost:3000,http://localhost:1234,http://localhost:5678,http://observe-front.cestong.com.cn"
- nginx.ingress.kubernetes.io/enable-cors: "true"
- nginx.ingress.kubernetes.io/cors-allow-headers: "*"
- nginx.ingress.kubernetes.io/cors-allow-methods: "*"
- nginx.ingress.kubernetes.io/cors-allow-credentials: "true"
- ingressClassName: nginx
- hosts:
- - host: otel-collector.cestong.com.cn
- paths:
- - path: /
- pathType: Prefix
- port: 4318
- additionalIngresses: []
- podMonitor:
- enabled: false
- metricsEndpoints:
- - port: metrics
- # interval: 15s
- # additional labels for the PodMonitor
- extraLabels: {}
- # release: kube-prometheus-stack
- serviceMonitor:
- # The service monitor by default scrapes the metrics port.
- # The metrics port needs to be enabled as well.
- enabled: false
- metricsEndpoints:
- - port: metrics
- # interval: 15s
- # additional labels for the ServiceMonitor
- extraLabels: {}
- # release: kube-prometheus-stack
- # PodDisruptionBudget is used only if deployment enabled
- podDisruptionBudget:
- enabled: false
- # minAvailable: 2
- # maxUnavailable: 1
- # autoscaling is used only if deployment enabled
- autoscaling:
- enabled: false
- minReplicas: 1
- maxReplicas: 10
- targetCPUUtilizationPercentage: 80
- # targetMemoryUtilizationPercentage: 80
- rollout:
- rollingUpdate: {}
- # When 'mode: daemonset', maxSurge cannot be used when hostPort is set for any of the ports
- # maxSurge: 25%
- # maxUnavailable: 0
- strategy: RollingUpdate
- prometheusRule:
- enabled: false
- groups: []
- # Create default rules for monitoring the collector
- defaultRules:
- enabled: false
- # additional labels for the PrometheusRule
- extraLabels: {}
- statefulset:
- # volumeClaimTemplates for a statefulset
- volumeClaimTemplates: []
- podManagementPolicy: "Parallel"
|