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

[receiver/prometheus] static scape config doesn't work with Target Allocator #36062

Open
povilasv opened this issue Oct 29, 2024 · 4 comments · May be fixed by #36063
Open

[receiver/prometheus] static scape config doesn't work with Target Allocator #36062

povilasv opened this issue Oct 29, 2024 · 4 comments · May be fixed by #36063
Labels
bug Something isn't working receiver/prometheus Prometheus receiver

Comments

@povilasv
Copy link
Contributor

Component(s)

receiver/prometheus

What happened?

Description

Duplicate of open-telemetry/opentelemetry-operator#3034

If you set both static scrape config and Target Allocator. Your static config will be ignored

Steps to Reproduce

      prometheus:
        config:
          scrape_configs:
          - job_name: opentelemetry-collector
            scrape_interval: 30s
            static_configs:
            - targets:
              - ${env:MY_POD_IP}:8888
        target_allocator:
          collector_id: ${env:MY_POD_NAME}
          endpoint: http://opentelemetry-targetallocator
          interval: 30s

Expected Result

Collector metrics to be scraped

Actual Result

No Collector metrics are scraped

Collector version

v0.112.0

Environment information

Environment

OS: (e.g., "Ubuntu 20.04")
Compiler(if manually compiled): (e.g., "go 14.2")

OpenTelemetry Collector configuration

prometheus:
        config:
          scrape_configs:
          - job_name: opentelemetry-collector
            scrape_interval: 30s
            static_configs:
            - targets:
              - ${env:MY_POD_IP}:8888
        target_allocator:
          collector_id: ${env:MY_POD_NAME}
          endpoint: http://opentelemetry-targetallocator
          interval: 30s

Log output

No response

Additional context

No response

@povilasv povilasv added bug Something isn't working needs triage New item requiring triage labels Oct 29, 2024
@github-actions github-actions bot added the receiver/prometheus Prometheus receiver label Oct 29, 2024
Copy link
Contributor

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@dashpole
Copy link
Contributor

closing as duplicate. Please add any useful additional information to the original bug.

@dashpole dashpole removed the needs triage New item requiring triage label Oct 29, 2024
@povilasv
Copy link
Contributor Author

povilasv commented Oct 29, 2024

FYI I've opened the issue here, so I can reference it in change log. It is duplicate as in issue opened in Operator, but the issue seems to be on the Collector side ( Prometheus Receiver), see PR -> #36063

@dashpole dashpole reopened this Oct 29, 2024
@dashpole
Copy link
Contributor

Ah, sorry. I missed that it was referencing an issue in another repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working receiver/prometheus Prometheus receiver
Projects
None yet
2 participants