Closed
Description
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
- 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.
- Conflict Resolution:
- If both endpoint and endpoints are defined for a target, it is treated as invalid, and validation fails.
- 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]

Additional context
I would like to take this task.