Skip to content

Enhance httpcheckreceiver to Support Nested "endpoints" Under targets #37121

Closed
@VenuEmmadi

Description

@VenuEmmadi

Component(s)

receiver/httpcheck

Is your feature request related to a problem? Please describe.

We propose an enhancement to the httpcheckreceiver configuration to allow endpoints to be nested under targets. This change introduces flexibility for users by enabling the definition of multiple endpoints per target while maintaining support for a single endpoint.

Describe the solution you'd like

Proposed Changes

  1. Support endpoints (list of URLs) and endpoint (single URL):
  • Introduced logic to handle both keys under targets.
  • endpoints allows defining multiple URLs for a single target.
  • endpoint allows specifying a single URL for a target.
  1. Conflict Resolution:
  • If both endpoint and endpoints are defined for a target, it is treated as invalid, and validation fails.
  1. Default Method Handling:
  • If method is not explicitly defined, a default HTTP method (e.g., GET) is applied during normalization.

Describe alternatives you've considered

Code should support below "endpoints" list and method is common for all.

receivers:
  httpcheck:
    collection_interval: 30s
    targets:
      - method: "GET"
        endpoints:
          - "https://httpbin.org/status/201"
          - "https://httpbin.org/status/404"
      - method: "POST"
        endpoint: "https://httpbin.org/status/500"
processors:
  batch:
    send_batch_max_size: 1000
    send_batch_size: 100
    timeout: 10s
exporters:
  debug:
    verbosity: detailed
service:
  pipelines:
    metrics:
      receivers: [httpcheck]
      processors: [batch]
      exporters: [debug]
![image](https://github.com/user-attachments/assets/077384ce-4620-4d32-ba74-b59ec486b99c)

Additional context

I would like to take this task.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions