Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make receivercreator's autodiscovery available in EDOT's configs #71

Open
ChrsMark opened this issue Jan 22, 2025 · 3 comments
Open

Make receivercreator's autodiscovery available in EDOT's configs #71

ChrsMark opened this issue Jan 22, 2025 · 3 comments

Comments

@ChrsMark
Copy link
Member

With the addition of elastic/elastic-agent#6561 in EDOT we will need to find a way to expose those to our users easily.

Probably a commented out section in the current helm charts values file can be the first thing to do along with a specific documentation section.

/cc @AlexanderWert @rogercoll @elastic/otel-devs

@ChrsMark
Copy link
Member Author

The Helm values files that we can use is the following:

mode: daemonset

image:
  repository: chrismark/otelcontribcol-dev
  tag: "latest"
  pullPolicy: IfNotPresent

command:
  name: otelcontribcol

clusterRole:
  create: true
  rules:
   - apiGroups:
     - ''
     resources:
     - 'pods'
     - 'nodes'
     verbs:
     - 'get'
     - 'list'
     - 'watch'
   - apiGroups: [ "" ]
     resources: [ "nodes/proxy"]
     verbs: [ "get" ]
   - apiGroups:
       - ""
     resources:
       - nodes/stats
     verbs:
       - get
   - nonResourceURLs:
       - "/metrics"
     verbs:
       - get

extraVolumeMounts:
 - name: varlogpods
   mountPath: /var/log/pods
   readOnly: true

extraVolumes:
  - name: varlogpods
    hostPath:
      path: /var/log/pods

config:
  extensions:
    k8s_observer:
      auth_type: serviceAccount
      node: ${env:K8S_NODE_NAME}
      observe_nodes: true
  exporters:
    debug/2:
      verbosity: basic
    debug:
      verbosity: detailed

  receivers:
    receiver_creator/metrics:
      watch_observers: [k8s_observer]
      discovery:
        enabled: true
      receivers:

    receiver_creator/logs:
      watch_observers: [k8s_observer]
      discovery:
        enabled: true
      receivers:


  service:
    extensions: [health_check, k8s_observer]
    telemetry:
      logs:
        level: INFO
    pipelines:
      metrics:
        receivers: [ receiver_creator/metrics ]
        processors: [ batch ]
        exporters: [ debug/2 ]
      logs/discovery:
        receivers: [ receiver_creator/logs ]
        #processors: [ batch ]
        exporters: [ debug ]

@AlexanderWert
Copy link
Member

Probably a commented out section in the current helm charts values file can be the first thing to do along with a specific documentation section.

Would there be any drawbacks in enabling it by default (i.e. not commenting it out)?

@ChrsMark
Copy link
Member Author

Probably a commented out section in the current helm charts values file can be the first thing to do along with a specific documentation section.

Would there be any drawbacks in enabling it by default (i.e. not commenting it out)?

One concern would be the load to the K8s API that k8s observer would produce anyways. The other one would be to ensure that the filelog receiver config block if tuned or removed entirely in case the logs discovery for logs is enabled. Otherwise we would have logs duplication.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants