Skip to content
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

Disable Kafka metricsets based on Jolokia #20989

Merged
merged 2 commits into from
Sep 9, 2020

Conversation

jsoriano
Copy link
Member

@jsoriano jsoriano commented Sep 4, 2020

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 and producer metricsets are intended to monitor
Java 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

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-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:

Error fetching data for metricset kafka.broker: error making http request: Post "http://pipeline-kafka:9092/jolokia/%3FignoreErrors=true&canonicalNaming=false": read tcp 10.5.7.136:34466->172.20.79.178:9092: read: connection reset by peer
Error fetching data for metricset kafka.producer: error making http request: Post "http://pipeline-kafka:9092/jolokia/%3FignoreErrors=true&canonicalNaming=false": read tcp 10.5.7.136:34470->172.20.79.178:9092: read: connection reset by peer

Metricbeat tries to request jolokia metrics from the Kafka endpoint.

Kafka metricsets based on Jolokia require a different configuration to
the native metricsets. Disable the Jolokia ones by default, if they want
to be used they need to be explicitly enabled and configured. Reference
configuration contains information about this.
@jsoriano jsoriano added review Team:Services (Deprecated) Label for the former Integrations-Services team labels Sep 4, 2020
@jsoriano jsoriano self-assigned this Sep 4, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/integrations-services (Team:Services)

@botelastic botelastic bot added needs_team Indicates that the issue/PR needs a Team:* label and removed needs_team Indicates that the issue/PR needs a Team:* label labels Sep 4, 2020
@jsoriano jsoriano added the needs_backport PR is waiting to be backported to other branches. label Sep 4, 2020
@elasticmachine
Copy link
Collaborator

elasticmachine commented Sep 4, 2020

💚 Build Succeeded

Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: [Pull request #20989 updated]

  • Start Time: 2020-09-04T14:49:34.801+0000

  • Duration: 67 min 1 sec

Test stats 🧪

Test Results
Failed 0
Passed 3192
Skipped 693
Total 3885

@andresrc
Copy link
Contributor

andresrc commented Sep 5, 2020

Will users that are using the module see a change in configuration when upgrading? I.e, can they get the module disabled?

@jsoriano jsoriano removed the v7.9.2 label Sep 5, 2020
@jsoriano
Copy link
Member Author

jsoriano commented Sep 5, 2020

Will users that are using the module see a change in configuration when upgrading? I.e, can they get the module disabled?

Users using the default configuration will see the jolokia metricsets disabled. For most of the cases this will mean less errors in logs, but no functionality loss.

The only case where I think this change may break something is if someone is using the kafka module, with default metricsets, to query a jolokia endpoint. In this case they will continue seeing errors querying the kafka broker, and they will lose the jolokia metrics. But I think this is a corner case.

Also, the jolokia metricsets are on beta, so I think it is ok if we do the change at this point, even when having the chance of breaking some cases.

I am removing the backport to 7.9, we have had it like this since 7.5, it is probably ok to wait till 7.10 to fix it.

@jsoriano jsoriano merged commit cce29d4 into elastic:master Sep 9, 2020
@jsoriano jsoriano deleted the kafka-disable-jolokia-metricsets branch September 9, 2020 11:31
jsoriano added a commit to jsoriano/beats that referenced this pull request Sep 9, 2020
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.

(cherry picked from commit cce29d4)
@jsoriano jsoriano removed the needs_backport PR is waiting to be backported to other branches. label Sep 9, 2020
v1v added a commit to v1v/beats that referenced this pull request Sep 14, 2020
* upstream/master: (362 commits)
  Add vendoring to Google Cloud Functions again (elastic#21070)
  [Elastic Agent] Add fleet.host.id for sending to endpoint. (elastic#21042)
  Do not need Google credentials before using it (elastic#21072)
  [Filebeat][New Module] Zoom webhook module (elastic#20414)
  Add support for GMT timezone offset in decode_cef (elastic#20993)
  Filebeat: Fix random error on harvester close (elastic#21048)
  Add ingress controller dashboards (elastic#21052)
  Fix loggers in composable module. (elastic#21047)
  [Ingest Manager] Increase kibana client timeout to 5 minutes (elastic#21037)
  Add changelog. (elastic#21041)
  [Elastic Agent] Add support for EQL based conditions (elastic#20994)
  Disable Kafka metricsets based on Jolokia (elastic#20989)
  Update apm agent (elastic#21031)
  Add container ECS fields in kubernetes metadata (elastic#20984)
  Sanitize event.host in Metricbeat (elastic#21022)
  Update api-keys.asciidoc - API key prerequisites (elastic#21026)
  [Filebeat][suricata] Map x509 for suricata/eve fileset (elastic#20973)
  [Filebeat][santa] Map x509 fields in santa module (elastic#20976)
  [Filebeat][fortinet] Map x509 ecs fields for fortinet fw fileset (elastic#20983)
  Bump zeek kerberos/ssl/x509 ecs version (elastic#21003)
  ...
v1v added a commit to v1v/beats that referenced this pull request Sep 14, 2020
* upstream/master: (364 commits)
  Add vendoring to Google Cloud Functions again (elastic#21070)
  [Elastic Agent] Add fleet.host.id for sending to endpoint. (elastic#21042)
  Do not need Google credentials before using it (elastic#21072)
  [Filebeat][New Module] Zoom webhook module (elastic#20414)
  Add support for GMT timezone offset in decode_cef (elastic#20993)
  Filebeat: Fix random error on harvester close (elastic#21048)
  Add ingress controller dashboards (elastic#21052)
  Fix loggers in composable module. (elastic#21047)
  [Ingest Manager] Increase kibana client timeout to 5 minutes (elastic#21037)
  Add changelog. (elastic#21041)
  [Elastic Agent] Add support for EQL based conditions (elastic#20994)
  Disable Kafka metricsets based on Jolokia (elastic#20989)
  Update apm agent (elastic#21031)
  Add container ECS fields in kubernetes metadata (elastic#20984)
  Sanitize event.host in Metricbeat (elastic#21022)
  Update api-keys.asciidoc - API key prerequisites (elastic#21026)
  [Filebeat][suricata] Map x509 for suricata/eve fileset (elastic#20973)
  [Filebeat][santa] Map x509 fields in santa module (elastic#20976)
  [Filebeat][fortinet] Map x509 ecs fields for fortinet fw fileset (elastic#20983)
  Bump zeek kerberos/ssl/x509 ecs version (elastic#21003)
  ...
jsoriano added a commit that referenced this pull request Sep 15, 2020
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.

(cherry picked from commit cce29d4)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
review Team:Services (Deprecated) Label for the former Integrations-Services team v7.10.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants