opentelemetry-collector-contrib
opentelemetry-collector-contrib copied to clipboard
jmx receiver autodiscover targets in kubernetes?
Component(s)
receiver/jmx
Is your feature request related to a problem? Please describe.
The problem is that the endpoint has to be hardcoded: https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/jmxreceiver#endpoint
datadog's jmx can autodiscovery: https://docs.datadoghq.com/containers/guide/autodiscovery-with-jmx/?tab=operator
Describe the solution you'd like
Some mechanism for autodiscovery of jmx endpoints for kubernetes.
Describe alternatives you've considered
No response
Additional context
No response
Pinging code owners:
- receiver/jmx: @rmfitzpatrick
See Adding Labels via Comments if you do not have permissions to add labels yourself.
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers
. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.
Pinging code owners:
- receiver/jmx: @rmfitzpatrick
See Adding Labels via Comments if you do not have permissions to add labels yourself.
Hey, this seems like a dupe of 31599, could I mark it as such?
TL;dr is that there are extensions/observers that can, in conjunction with receivercreator
, dynamically add jmx, but there are some caveats
@ datadog, it seems they have you specify a port for autodiscovery
Set <JMX_PORT> as desired, as long as it matches between the annotations and JAVA_OPTS
in the context of the docker observer/receiver_creator, you would specify port == JMXPORT
in the rules, similar to the redis example
redis/1:
# If this rule matches an instance of this receiver will be started.
rule: type == "port" && port == 6379
config:
# Static receiver-specific config.
password: secret
# Dynamic configuration value.
collection_interval: '`pod.annotations["collection_interval"]`'
@hughesjj feel free to mark this as a duplicate. I am going to close this issue.