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

[Filebeat] Convert logstash logEvent.action objects to strings #23944

Merged

Conversation

andrewkroh
Copy link
Member

@andrewkroh andrewkroh commented Feb 9, 2021

What does this PR do?

To prevent index failures resulting from indexing a mix of strings and nested objects as
logstash.log.log_event.action, this converts any objects to a stringified version of the object
using painless toString().

Fixes #20709

Why is it important?

See #20709 for details on the failure. This fixes index failures when ingesting Logstash logs.

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 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

@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Feb 9, 2021
@andrewkroh andrewkroh added the Team:Integrations Label for the Integrations team label Feb 9, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/integrations (Team:Integrations)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Feb 9, 2021
@andresrc
Copy link
Contributor

andresrc commented Feb 9, 2021

Thanks @andrewkroh ! @sayden please check if this needs to be in the feature branch before starting with logstash

@elasticmachine
Copy link
Collaborator

elasticmachine commented Feb 9, 2021

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: Pull request #23944 updated

  • Start Time: 2021-02-16T01:30:21.909+0000

  • Duration: 56 min 23 sec

  • Commit: 1b4b7e4

Test stats 🧪

Test Results
Failed 0
Passed 13041
Skipped 2047
Total 15088

Trends 🧪

Image of Build Times

Image of Tests

💚 Flaky test report

Tests succeeded.

Expand to view the summary

Test stats 🧪

Test Results
Failed 0
Passed 13041
Skipped 2047
Total 15088

@andrewkroh andrewkroh force-pushed the bugfix/fb/logstash-actions-array branch from e8dbd9c to f21d92b Compare February 9, 2021 18:43
@andrewkroh andrewkroh added the needs_backport PR is waiting to be backported to other branches. label Feb 12, 2021
To prevent index failures resulting from indexing a mix of strings and nested objects as
logstash.log.log_event.action, this converts any objects to a stringified version of the object
using painless toString().

Fixes elastic#20709
Copy link
Contributor

@leehinman leehinman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like changelog has some extra entries, otherwise LGTM

Comment on lines 382 to 383
- Fix goroutines leak with some inputs in autodiscover. {pull}23722[23722]
- Fix various processing errors in the Suricata module. {pull}23236[23236]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extra?

@andrewkroh andrewkroh merged commit 0d4109d into elastic:master Feb 16, 2021
andrewkroh added a commit to andrewkroh/beats that referenced this pull request Feb 16, 2021
…ic#23944)

To prevent index failures resulting from indexing a mix of strings and nested objects as
logstash.log.log_event.action, this converts any objects to a stringified version of the object
using painless toString().

Fixes elastic#20709

(cherry picked from commit 0d4109d)
@andrewkroh andrewkroh added v7.12.0 and removed needs_backport PR is waiting to be backported to other branches. labels Feb 16, 2021
andrewkroh added a commit that referenced this pull request Feb 16, 2021
… (#24063)

To prevent index failures resulting from indexing a mix of strings and nested objects as
logstash.log.log_event.action, this converts any objects to a stringified version of the object
using painless toString().

Fixes #20709

(cherry picked from commit 0d4109d)
v1v added a commit to v1v/beats that referenced this pull request Feb 17, 2021
…-arm

* upstream/master:
  [CI] install docker-compose with retry (elastic#24069)
  Add nodes to filebeat-kubernetes.yaml ClusterRole - fixes elastic#24051 (elastic#24052)
  updating manifest files for filebeat threatintel module (elastic#24074)
  Add Zeek Signatures (elastic#23772)
  Update Beats to ECS 1.8.0 (elastic#23465)
  Support running Docker logging plugin on ARM64 (elastic#24034)
  Fix ec2 metricset fields.yml and add integration test (elastic#23726)
  Only build targz and zip versions of Beats if PACKAGES is set in agent (elastic#24060)
  [Filebeat] Add field definitions for known Netflow/IPFIX vendor fields (elastic#23773)
  [Elastic Agent] Enroll with Fleet Server (elastic#23865)
  [Filebeat] Convert logstash logEvent.action objects to strings (elastic#23944)
  [Ingest Management] Fix reloading of log level for services (elastic#24055)
  Add Agent standalone k8s manifest (elastic#23679)
v1v added a commit to v1v/beats that referenced this pull request Feb 17, 2021
…dows-7

* upstream/master: (332 commits)
  Use ECS v1.8.0 (elastic#24086)
  Add support for postgresql csv logs (elastic#23334)
  [Heartbeat] Refactor config system (elastic#23467)
  [CI] install docker-compose with retry (elastic#24069)
  Add nodes to filebeat-kubernetes.yaml ClusterRole - fixes elastic#24051 (elastic#24052)
  updating manifest files for filebeat threatintel module (elastic#24074)
  Add Zeek Signatures (elastic#23772)
  Update Beats to ECS 1.8.0 (elastic#23465)
  Support running Docker logging plugin on ARM64 (elastic#24034)
  Fix ec2 metricset fields.yml and add integration test (elastic#23726)
  Only build targz and zip versions of Beats if PACKAGES is set in agent (elastic#24060)
  [Filebeat] Add field definitions for known Netflow/IPFIX vendor fields (elastic#23773)
  [Elastic Agent] Enroll with Fleet Server (elastic#23865)
  [Filebeat] Convert logstash logEvent.action objects to strings (elastic#23944)
  [Ingest Management] Fix reloading of log level for services (elastic#24055)
  Add Agent standalone k8s manifest (elastic#23679)
  [Metricbeat][Kubernetes] Extend state_node with more conditions (elastic#23905)
  [CI] googleStorageUploadExt step (elastic#24048)
  Check fields are documented for aws metricsets (elastic#23887)
  Update go-concert to 0.1.0 (elastic#23770)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Filebeat Filebeat Team:Integrations Label for the Integrations team v7.12.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mapping error ingesting logstash loggin
4 participants