Cherry-pick #20989 to 7.x: Disable Kafka metricsets based on Jolokia #21036
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Cherry-pick of PR #20989 to 7.x branch. Original message:
What does this PR do?
Kafka metricsets based on Jolokia require a different configuration to
the native metricsets. Disable the Jolokia ones by default, if someone
wants to use them, they need to explicitly enable and configure them.
Reference configuration contains information about this.
At the moment there is no way we can provide default metricsets in the
same module that need different hosts configurations.
In any case
consumer
andproducer
metricsets are intended to monitorJava consumers and producers, while the rest of metricsets are intended
to monitor Kafka brokers. So there is little chance that all of them are going
to be enabled in the same configuration.
Why is it important?
To avoid errors with default configuration.
Checklist
I have added tests that prove my fix is effective or that my feature worksCHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.Related issues
Use cases
Using the kafka module, without specifying defaults, should provide a working configuration.
Logs
Errors like these ones appear when using default configuration:
Metricbeat tries to request jolokia metrics from the Kafka endpoint.