Skip to content

mysql_enterprise: fix handling of streaming data sent as partial array object - #5942

Merged
efd6 merged 1 commit into
elastic:mainfrom
efd6:5941-mysql_enterprise
Apr 23, 2023
Merged

mysql_enterprise: fix handling of streaming data sent as partial array object#5942
efd6 merged 1 commit into
elastic:mainfrom
efd6:5941-mysql_enterprise

Conversation

@efd6

@efd6 efd6 commented Apr 20, 2023

Copy link
Copy Markdown
Contributor

What does this PR do?

MySQL send its audit logs as parts of an infinitely long JSON array and so separates each line of the logs with a comma. We don't know that we are in an array since the first line of the log may not have been sent to us, so remove the trailing comma to treat each element of the partial array object as an object in a JSON stream.

Checklist

  • I have reviewed tips for building integrations and this pull request is aligned with them.
  • I have verified that all data streams collect metrics or logs.
  • I have added an entry to my package's changelog.yml file.
  • I have verified that Kibana version constraints are current according to guidelines.

Author's Checklist

  • [ ]

How to test this PR locally

Related issues

Screenshots

@efd6 efd6 added bug Something isn't working, use only for issues Team:Security-External Integrations Integration:mysql MySQL labels Apr 20, 2023
@efd6 efd6 self-assigned this Apr 20, 2023
…y object

MySQL send its audit logs as parts of an infinitely long JSON array and
so separates each line of the logs with a comma. We don't know that we
are in an array since the first line of the log may not have been sent
to us, so remove the trailing comma to treat each element of the partial
array object as an object in a JSON stream.
@efd6
efd6 force-pushed the 5941-mysql_enterprise branch from 2b1ade8 to 083e1f3 Compare April 20, 2023 21:46
@elasticmachine

elasticmachine commented Apr 20, 2023

Copy link
Copy Markdown

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

Expand to view the summary

Build stats

  • Start Time: 2023-04-20T21:47:32.384+0000

  • Duration: 15 min 21 sec

Test stats 🧪

Test Results
Failed 0
Passed 5
Skipped 0
Total 5

🤖 GitHub comments

Expand to view the GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

@elasticmachine

Copy link
Copy Markdown

🌐 Coverage report

Name Metrics % (covered/total) Diff
Packages 100.0% (1/1) 💚
Files 100.0% (1/1) 💚 3.026
Classes 100.0% (1/1) 💚 3.026
Methods 100.0% (13/13) 💚 8.296
Lines 95.283% (202/212) 👍 3.256
Conditionals 100.0% (0/0) 💚
@efd6
efd6 marked this pull request as ready for review April 20, 2023 22:06
@efd6
efd6 requested a review from a team as a code owner April 20, 2023 22:06
@elasticmachine

Copy link
Copy Markdown

Pinging @elastic/security-external-integrations (Team:Security-External Integrations)

@kcreddy kcreddy left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM 👍🏼

@efd6
efd6 merged commit 23664b2 into elastic:main Apr 23, 2023
@elasticmachine

Copy link
Copy Markdown

Package mysql_enterprise - 1.5.1 containing this change is available at https://epr.elastic.co/search?package=mysql_enterprise

@andrewkroh andrewkroh added Integration:mysql_enterprise MySQL Enterprise (Audit Logs) and removed Integration:mysql MySQL labels Jul 22, 2024
@efd6
efd6 deleted the 5941-mysql_enterprise branch February 5, 2025 22:11
orestisfl pushed a commit to orestisfl/integrations that referenced this pull request May 15, 2026
…y object (elastic#5942)

MySQL send its audit logs as parts of an infinitely long JSON array and
so separates each line of the logs with a comma. We don't know that we
are in an array since the first line of the log may not have been sent
to us, so remove the trailing comma to treat each element of the partial
array object as an object in a JSON stream.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working, use only for issues Integration:mysql_enterprise MySQL Enterprise (Audit Logs)

4 participants