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

Prometheus Receiver is incompatible with Prometheus behaviour on how checks on file_sd_configs are handled #21509

Closed
PaurushGarg opened this issue May 5, 2023 · 3 comments
Labels
bug Something isn't working receiver/prometheus Prometheus receiver

Comments

@PaurushGarg
Copy link
Member

PaurushGarg commented May 5, 2023

Component(s)

receiver/prometheus

What happened?

Description

Currently, Prometheus Receiver fails with error during config validation when sd_file is not found but provided in the file_sd_config. However, Prometheus in the absence of sd_files or targetgroups only logs the error and continue to watch the sd_file_path.
This issue was opened on aws-observability/aws-otel-collector repo here.
This issue also breaks the ECS_Observer as given here.

Steps to Reproduce

Run the Otel Collector and Prometheus with the file_sd_config configuration.

Expected Result

Expected to see compatibility between Otel Collector (Prometheus Receiver) and Prometheus handling of the file_sd_config sd_file validation check, and didn't expect Otel Collector to fail in absence of sd_file.

Actual Result

In absence of sd_file, Otel Collector exits, while Prometheus continues to watch the sd_file_path.

Collector version

v0.76.3

Environment information

Environment

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

OpenTelemetry Collector configuration

receivers:
  prometheus:
    config:
      scrape_configs:
        - job_name: "ecssd"
          file_sd_configs:
            - files:
                - 'ecs_sd_targets.yaml'

exporters:
  logging:
    verbosity: detailed

service:
  telemetry:
    logs:
      level: ${log_level}
  pipelines:
    metrics:
      receivers: [ prometheus ]
      exporters: [ logging ]

Log output

No response

Additional context

No response

@PaurushGarg PaurushGarg added bug Something isn't working needs triage New item requiring triage labels May 5, 2023
@github-actions github-actions bot added the receiver/prometheus Prometheus receiver label May 5, 2023
@github-actions
Copy link
Contributor

github-actions bot commented May 5, 2023

Pinging code owners:

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

@PaurushGarg PaurushGarg changed the title OTel Prometheus is incompatible with Prometheus behaviour on how checks on file_sd_configs are handled Prometheus Receiver is incompatible with Prometheus behaviour on how checks on file_sd_configs are handled May 5, 2023
@atoulme atoulme removed the needs triage New item requiring triage label May 6, 2023
@gwiesing
Copy link

gwiesing commented May 8, 2023

We are using a AWS EFS where the sd_file is stored. Thus, we can not simply create or point to an empty sd_file during docker build but have to create that file during container start with a shell script to avoid the container fail because of that behaviour.

@PaurushGarg
Copy link
Member Author

Closing this issue as the relevant PR (#21680) of this scope has been merged to opentelemetry-collector-contrib.

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
Development

No branches or pull requests

3 participants