Skip to content

[receiver/httpcheck] #47257

@janpolito

Description

@janpolito

Component(s)

receiver/httpcheck

What happened?

Description

I have otel + httpcheck receiver running from a docker container (podman) on my local network. It works fine except for following metrics that remain always at 0:
httpcheck_client_connection_duration_milliseconds
httpcheck_client_request_duration_milliseconds
httpcheck_dns_lookup_duration_milliseconds
httpcheck_response_duration_milliseconds
httpcheck_tls_handshake_duration_milliseconds

The global httpcheck time (httpcheck_duration_milliseconds) is however ok (between 20 and 40 ms for my targets).
Also the other metrics look good:
httpcheck_tls_cert_remaining_seconds
httpcheck_status
httpcheck_response_size_bytes

If I do a test of http timing with curl or blackbox exporter, I get consistent values, never at 0.

Steps to Reproduce

docker pull otel/opentelemetry-collector-contrib:0.148.0
Run the container with otel config like:

receivers:
httpcheck:
collection_interval: 30s
metrics:
httpcheck.dns.lookup.duration:
enabled: true
httpcheck.client.connection.duration:
enabled: true
httpcheck.tls.handshake.duration:
enabled: true
httpcheck.client.request.duration:
enabled: true
httpcheck.duration:
enabled: true
httpcheck.response.duration:
enabled: true
httpcheck.tls.cert_remaining:
enabled: true
httpcheck.validation.passed:
enabled: true
httpcheck.validation.failed:
enabled: true
httpcheck.response.size:
enabled: true
targets:
- endpoint: "http://url1"
timeout: 5s
- endpoint: "https://url2"
timeout: 5s
headers:
Token: XXXXXXXXXXXXXXX

exporters:
debug:
verbosity: detailed
prometheus:
endpoint: "0.0.0.0:9100"

service:
pipelines:
metrics:
receivers: [httpcheck]
exporters: [prometheus,debug]

Expected Result

Following metrics should not at 0:
httpcheck_client_connection_duration_milliseconds
httpcheck_client_request_duration_milliseconds
httpcheck_dns_lookup_duration_milliseconds
httpcheck_response_duration_milliseconds
httpcheck_tls_handshake_duration_milliseconds

Actual Result

Following metrics always at 0:
httpcheck_client_connection_duration_milliseconds
httpcheck_client_request_duration_milliseconds
httpcheck_dns_lookup_duration_milliseconds
httpcheck_response_duration_milliseconds
httpcheck_tls_handshake_duration_milliseconds

Collector version

0.148.0

Environment information

Environment

OS: RHEL 8 + Podman

OpenTelemetry Collector configuration

receivers:
  httpcheck:
    collection_interval: 30s
    metrics:
      httpcheck.dns.lookup.duration:
        enabled: true
      httpcheck.client.connection.duration:
        enabled: true
      httpcheck.tls.handshake.duration:
        enabled: true
      httpcheck.client.request.duration:
        enabled: true
      httpcheck.duration:
        enabled: true
      httpcheck.response.duration:
        enabled: true
      httpcheck.tls.cert_remaining:
        enabled: true
      httpcheck.validation.passed:
        enabled: true
      httpcheck.validation.failed:
        enabled: true
      httpcheck.response.size:
        enabled: true
    targets:
      - endpoint: "http://url1"
        timeout: 5s
      - endpoint: "https://url2"
        timeout: 5s
        headers:
          Token: XXXXXXXXXXXXXXX

exporters:
  debug:
    verbosity: detailed
  prometheus:
    endpoint: "0.0.0.0:9100"

service:
  pipelines:
    metrics:
      receivers: [httpcheck]
      exporters: [prometheus,debug]

Log output

Additional context

No response

Tip

React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingreceiver/httpcheckHTTP Check receiver

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions