-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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/receivercreator] Support for probing K8s services #29021
Comments
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
I created a first PR for it: #29022 Service Port Discovery Resource Attributes Service attributes |
@a-thaler Hi, As I kown, blackbox-exporter not only do |
Hi @JaredTan95, I currently care about HTTP and like to leverage the httpcheck receiver, but the approach outlined here is agnostic to the protocol as it determines the endpoint only and provides you the service context. It then depends on the actual nested receiver config. So a potential receiver resulting out of the linked feature request should be usable as well. |
make sense |
) **Description:** - Added a new watch to the k8s_observer extension for k8s services, which can be enabled using a new flag "observe_services". - Discovered entities are transformed into a new endpoint type `k8s.service`. - Adjusted the receivercreator to support the new type `k8s.service` **Link to tracking Issue:** [#29021](#29021) **Testing:** Added unit tests analogue to the available tests **Documentation:** Adjusted readme's of k8s_observer and receivercreator. Added description of new flags and typers. **Note:** Current implementation is working as described in the linked ticket. Please check the potential discussion points mentioned in the ticket: #29021 (comment) --------- Co-authored-by: Antoine Toulme <antoine@toulme.name>
Feature got merged as proposed with #29022. Further improvements will be handled in individual issues. |
…n-telemetry#29022) **Description:** - Added a new watch to the k8s_observer extension for k8s services, which can be enabled using a new flag "observe_services". - Discovered entities are transformed into a new endpoint type `k8s.service`. - Adjusted the receivercreator to support the new type `k8s.service` **Link to tracking Issue:** [open-telemetry#29021](open-telemetry#29021) **Testing:** Added unit tests analogue to the available tests **Documentation:** Adjusted readme's of k8s_observer and receivercreator. Added description of new flags and typers. **Note:** Current implementation is working as described in the linked ticket. Please check the potential discussion points mentioned in the ticket: open-telemetry#29021 (comment) --------- Co-authored-by: Antoine Toulme <antoine@toulme.name>
…n-telemetry#29022) **Description:** - Added a new watch to the k8s_observer extension for k8s services, which can be enabled using a new flag "observe_services". - Discovered entities are transformed into a new endpoint type `k8s.service`. - Adjusted the receivercreator to support the new type `k8s.service` **Link to tracking Issue:** [open-telemetry#29021](open-telemetry#29021) **Testing:** Added unit tests analogue to the available tests **Documentation:** Adjusted readme's of k8s_observer and receivercreator. Added description of new flags and typers. **Note:** Current implementation is working as described in the linked ticket. Please check the potential discussion points mentioned in the ticket: open-telemetry#29021 (comment) --------- Co-authored-by: Antoine Toulme <antoine@toulme.name>
Component(s)
receiver/receivercreator
extension/observer
Is your feature request related to a problem? Please describe.
I used the typical setup of blackbox-exporter and prometheus to probe the availability of k8s services and make the results available as metrics. Hereby, the discovery of services by prometheus annotations is an elegant approach.
With the availability of the httpcheck receiver the setup can be turned into an otel-collector based setup. However, the configuration is static and does not support any discovery capabilities.
The receivercreator reciever seems the perfect match for that scenario by configuring the httpcheck dynamically dependent on the discovered service endpoints.
Describe the solution you'd like
Add support to the k8s_observer to watch k8s services, so that a new rule type
k8s.service
is available in the receivercreator reciever which allows the dynamic configuration of the httpcheck receiver.An example configuration might look like this:
A more advanced config could look like this:
Describe alternatives you've considered
As the httpcheck receiver does not support any discovery, the only alternative is to stick to the blackbox-exporter and use the prometheusreceiver with a target_allocator instead which is way more complex and requires the blackbox-exporter.
Additional context
No response
The text was updated successfully, but these errors were encountered: