-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Kubernetes autodiscover - multiple ports #15796
Comments
This is a fair request, thank you for opening! The issue comes from the fact that we spawn an autodiscover event for every port in the Pod. Configs like I think offering thoughts @odacremolbap @ChrsMark @vjsamuel ? |
+1 for the |
@anyasabo would named ports only be useful for you? I'm worried about using the index number for this, as a slight change can result on unexpected behaviors |
Ah sorry I missed your earlier question @exekias , yes specifying the named port would be helpful. @ChrsMark if I understand the description correctly, the first PR linked only changes behavior when ports are not exposed. In this case multiple ports are exposed but we only want to scrape one. Ditto with the second one it's definitely possible I'm misunderstanding, but it looks like that fixes a bug in how we were doing substring matching (e.g. |
👍 @anyasabo thanks ! I will provide a patch to support |
If the port is known, setting it in the configuration, without using
I think that this recent fix #18979 by @vjsamuel will prevent that configurations like these ones start unexpected modules, so this could work to avoid starting a module for the transport port in this case. In any case having support for |
You should just be able to do |
What @jsoriano and @vjsamuel mention, using directly sth like However I think that what @anyasabo requests is slightly different and it comes to @jsoriano 's In any case I drafted sth for the shake of this discussion: #19398 |
Closed via #19398 |
Describe the enhancement:
For ECK we have multiple exposed ports on our Elasticsearch containers -- http and transport. When using autodiscover, it would be helpful to be able to specify which port we want to use for metricbeat. @exekias did some looking for me, and currently $data.port sets up events for all of the defined ports, but the transport one will not work and generate errors. If we could specify which port we want to use in our autodiscover configuration it would be helpful.
Maybe referencing the name of the port (e.g.
$data.ports.http
), the index of the port ($data.ports[1]
), or maybe with a hint telling autodiscover which port name to use (co.elastic.metrics/metrics_port: http
)?The text was updated successfully, but these errors were encountered: