beats icon indicating copy to clipboard operation
beats copied to clipboard

[libbeat] Introduce Apache Pulsar to beats as an output plugin

Open dao-jun opened this issue 1 year ago • 30 comments

Proposed commit message

Introduce Apache Pulsar to beats as an output plugin, and users could send data to Pulsar.

Checklist

  • [x] My code follows the style guidelines of this project
  • [x] I have commented my code, particularly in hard-to-understand areas
  • [x] I have made corresponding changes to the documentation
  • [x] I have made corresponding change to the default configuration files
  • [x] I have added tests that prove my fix is effective or that my feature works
  • [x] I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

Author's Checklist

  • [ ]

How to test this PR locally

Related issues

Use cases

Screenshots

Logs

dao-jun avatar Jan 05 '24 11:01 dao-jun

💚 CLA has been signed

This pull request does not have a backport label. If this is a bug or security fix, could you label this PR @dao-jun? 🙏. For such, you'll need to label your PR with:

  • The upcoming major version of the Elastic Stack
  • The upcoming minor version of the Elastic Stack (if you're not pushing a breaking change)

To fixup this pull request, you need to add the backport labels for the needed branches, such as:

  • backport-v8./d.0 is the label to automatically backport to the 8./d branch. /d is the digit

mergify[bot] avatar Jan 05 '24 12:01 mergify[bot]

:grey_exclamation: Build Aborted

The PR is not allowed to run in the CI yet

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

  • Start Time: 2024-01-05T11:59:46.038+0000

  • Duration: 5 min 1 sec

Steps errors 2

Expand to view the steps failures

Load a resource file from a library
  • Took 0 min 0 sec . View more details here
  • Description: approval-list/elastic/beats.yml
Error signal
  • Took 0 min 0 sec . View more details here
  • Description: githubApiCall: The REST API call https://api.github.com/orgs/elastic/members/dao-jun return the message : java.lang.Exception: httpRequest: Failure connecting to the service https://api.github.com/orgs/elastic/members/dao-jun : httpRequest: Failure connecting to the service https://api.github.com/orgs/elastic/members/dao-jun : Code: 404Error: {"message":"User does not exist or is not a member of the organization","documentation_url":"https://docs.github.com/rest/orgs/members#check-organization-membership-for-a-user"}

:robot: GitHub comments

Expand to view the GitHub comments

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

  • /test : Re-trigger the build.

  • /package : Generate the packages and run the E2E tests.

  • /beats-tester : Run the installation tests with beats-tester.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

elasticmachine avatar Jan 05 '24 12:01 elasticmachine

:grey_exclamation: Build Aborted

The PR is not allowed to run in the CI yet

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

  • Start Time: 2024-01-06T10:08:44.631+0000

  • Duration: 6 min 57 sec

Steps errors 2

Expand to view the steps failures

Load a resource file from a library
  • Took 0 min 0 sec . View more details here
  • Description: approval-list/elastic/beats.yml
Error signal
  • Took 0 min 0 sec . View more details here
  • Description: githubApiCall: The REST API call https://api.github.com/orgs/elastic/members/dao-jun return the message : java.lang.Exception: httpRequest: Failure connecting to the service https://api.github.com/orgs/elastic/members/dao-jun : httpRequest: Failure connecting to the service https://api.github.com/orgs/elastic/members/dao-jun : Code: 404Error: {"message":"User does not exist or is not a member of the organization","documentation_url":"https://docs.github.com/rest/orgs/members#check-organization-membership-for-a-user"}

:robot: GitHub comments

Expand to view the GitHub comments

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

  • /test : Re-trigger the build.

  • /package : Generate the packages and run the E2E tests.

  • /beats-tester : Run the installation tests with beats-tester.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

elasticmachine avatar Jan 06 '24 10:01 elasticmachine

:grey_exclamation: Build Aborted

The PR is not allowed to run in the CI yet

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

  • Start Time: 2024-01-06T10:22:42.539+0000

  • Duration: 7 min 36 sec

Steps errors 2

Expand to view the steps failures

Load a resource file from a library
  • Took 0 min 0 sec . View more details here
  • Description: approval-list/elastic/beats.yml
Error signal
  • Took 0 min 0 sec . View more details here
  • Description: githubApiCall: The REST API call https://api.github.com/orgs/elastic/members/dao-jun return the message : java.lang.Exception: httpRequest: Failure connecting to the service https://api.github.com/orgs/elastic/members/dao-jun : httpRequest: Failure connecting to the service https://api.github.com/orgs/elastic/members/dao-jun : Code: 404Error: {"message":"User does not exist or is not a member of the organization","documentation_url":"https://docs.github.com/rest/orgs/members#check-organization-membership-for-a-user"}

:robot: GitHub comments

Expand to view the GitHub comments

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

  • /test : Re-trigger the build.

  • /package : Generate the packages and run the E2E tests.

  • /beats-tester : Run the installation tests with beats-tester.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

elasticmachine avatar Jan 06 '24 10:01 elasticmachine

:grey_exclamation: Build Aborted

The PR is not allowed to run in the CI yet

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

  • Start Time: 2024-01-06T10:34:47.749+0000

  • Duration: 5 min 25 sec

Steps errors 2

Expand to view the steps failures

Load a resource file from a library
  • Took 0 min 0 sec . View more details here
  • Description: approval-list/elastic/beats.yml
Error signal
  • Took 0 min 0 sec . View more details here
  • Description: githubApiCall: The REST API call https://api.github.com/orgs/elastic/members/dao-jun return the message : java.lang.Exception: httpRequest: Failure connecting to the service https://api.github.com/orgs/elastic/members/dao-jun : httpRequest: Failure connecting to the service https://api.github.com/orgs/elastic/members/dao-jun : Code: 404Error: {"message":"User does not exist or is not a member of the organization","documentation_url":"https://docs.github.com/rest/orgs/members#check-organization-membership-for-a-user"}

:robot: GitHub comments

Expand to view the GitHub comments

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

  • /test : Re-trigger the build.

  • /package : Generate the packages and run the E2E tests.

  • /beats-tester : Run the installation tests with beats-tester.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

elasticmachine avatar Jan 06 '24 10:01 elasticmachine

:grey_exclamation: Build Aborted

The PR is not allowed to run in the CI yet

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

  • Start Time: 2024-01-06T12:25:54.670+0000

  • Duration: 7 min 31 sec

Steps errors 2

Expand to view the steps failures

Load a resource file from a library
  • Took 0 min 0 sec . View more details here
  • Description: approval-list/elastic/beats.yml
Error signal
  • Took 0 min 0 sec . View more details here
  • Description: githubApiCall: The REST API call https://api.github.com/orgs/elastic/members/dao-jun return the message : java.lang.Exception: httpRequest: Failure connecting to the service https://api.github.com/orgs/elastic/members/dao-jun : httpRequest: Failure connecting to the service https://api.github.com/orgs/elastic/members/dao-jun : Code: 404Error: {"message":"User does not exist or is not a member of the organization","documentation_url":"https://docs.github.com/rest/orgs/members#check-organization-membership-for-a-user"}

:robot: GitHub comments

Expand to view the GitHub comments

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

  • /test : Re-trigger the build.

  • /package : Generate the packages and run the E2E tests.

  • /beats-tester : Run the installation tests with beats-tester.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

elasticmachine avatar Jan 06 '24 12:01 elasticmachine

:grey_exclamation: Build Aborted

The PR is not allowed to run in the CI yet

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

  • Start Time: 2024-01-08T10:59:47.610+0000

  • Duration: 5 min 44 sec

Steps errors 2

Expand to view the steps failures

Load a resource file from a library
  • Took 0 min 0 sec . View more details here
  • Description: approval-list/elastic/beats.yml
Error signal
  • Took 0 min 0 sec . View more details here
  • Description: githubApiCall: The REST API call https://api.github.com/orgs/elastic/members/dao-jun return the message : java.lang.Exception: httpRequest: Failure connecting to the service https://api.github.com/orgs/elastic/members/dao-jun : httpRequest: Failure connecting to the service https://api.github.com/orgs/elastic/members/dao-jun : Code: 404Error: {"message":"User does not exist or is not a member of the organization","documentation_url":"https://docs.github.com/rest/orgs/members#check-organization-membership-for-a-user"}

:robot: GitHub comments

Expand to view the GitHub comments

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

  • /test : Re-trigger the build.

  • /package : Generate the packages and run the E2E tests.

  • /beats-tester : Run the installation tests with beats-tester.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

elasticmachine avatar Jan 08 '24 11:01 elasticmachine

This pull request is now in conflicts. Could you fix it? 🙏 To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/

git fetch upstream
git checkout -b dev/pulsar_output upstream/dev/pulsar_output
git merge upstream/main
git push upstream dev/pulsar_output

mergify[bot] avatar Jan 10 '24 23:01 mergify[bot]

/test

cmacknz avatar Jan 11 '24 20:01 cmacknz

:grey_exclamation: Build Aborted

The PR is not allowed to run in the CI yet

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

  • Start Time: 2024-01-16T08:00:40.088+0000

  • Duration: 6 min 50 sec

Steps errors 2

Expand to view the steps failures

Load a resource file from a library
  • Took 0 min 0 sec . View more details here
  • Description: approval-list/elastic/beats.yml
Error signal
  • Took 0 min 0 sec . View more details here
  • Description: githubApiCall: The REST API call https://api.github.com/orgs/elastic/members/dao-jun return the message : java.lang.Exception: httpRequest: Failure connecting to the service https://api.github.com/orgs/elastic/members/dao-jun : httpRequest: Failure connecting to the service https://api.github.com/orgs/elastic/members/dao-jun : Code: 404Error: {"message":"User does not exist or is not a member of the organization","documentation_url":"https://docs.github.com/rest/orgs/members#check-organization-membership-for-a-user"}

:robot: GitHub comments

Expand to view the GitHub comments

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

  • /test : Re-trigger the build.

  • /package : Generate the packages and run the E2E tests.

  • /beats-tester : Run the installation tests with beats-tester.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

elasticmachine avatar Jan 16 '24 08:01 elasticmachine

@cmacknz This PR is ready to review. PTAL

dao-jun avatar Jan 16 '24 09:01 dao-jun

:grey_exclamation: Build Aborted

The PR is not allowed to run in the CI yet

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

  • Start Time: 2024-01-16T09:02:34.561+0000

  • Duration: 5 min 41 sec

Steps errors 2

Expand to view the steps failures

Load a resource file from a library
  • Took 0 min 0 sec . View more details here
  • Description: approval-list/elastic/beats.yml
Error signal
  • Took 0 min 0 sec . View more details here
  • Description: githubApiCall: The REST API call https://api.github.com/orgs/elastic/members/dao-jun return the message : java.lang.Exception: httpRequest: Failure connecting to the service https://api.github.com/orgs/elastic/members/dao-jun : httpRequest: Failure connecting to the service https://api.github.com/orgs/elastic/members/dao-jun : Code: 404Error: {"message":"User does not exist or is not a member of the organization","documentation_url":"https://docs.github.com/rest/orgs/members#check-organization-membership-for-a-user"}

:robot: GitHub comments

Expand to view the GitHub comments

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

  • /test : Re-trigger the build.

  • /package : Generate the packages and run the E2E tests.

  • /beats-tester : Run the installation tests with beats-tester.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

elasticmachine avatar Jan 16 '24 09:01 elasticmachine

/test

cmacknz avatar Jan 17 '24 19:01 cmacknz

This pull request is now in conflicts. Could you fix it? 🙏 To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/

git fetch upstream
git checkout -b dev/pulsar_output upstream/dev/pulsar_output
git merge upstream/main
git push upstream dev/pulsar_output

mergify[bot] avatar Jan 18 '24 06:01 mergify[bot]

Thanks, can you give us instructions on how test this manually ourselves?

cmacknz avatar Jan 24 '24 19:01 cmacknz

@dao-jun any news regarding @cmacknz question?

pierrehilbert avatar Feb 01 '24 17:02 pierrehilbert

Thanks, can you give us instructions on how test this manually ourselves?

@cmacknz sry for the delay reply, you can test the feat by the following way:

  1. download Apache Pulsar https://github.com/apache/pulsar
  2. cd /path/to/pulsar/bin
  3. pulsar standalone
  4. download and build the branch https://github.com/dao-jun/beats/tree/dev/pulsar_output
  5. config pulsar output
filebeat.inputs:
- type: log
  paths:
    - /var/log/messages
    - /var/log/*.log
output.pulsar:
  endpoint: pulsar://localhost:6650
  topic: persistent://public/default/beats
  1. start beats

dao-jun avatar Feb 02 '24 07:02 dao-jun

This pull request is now in conflicts. Could you fix it? 🙏 To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/

git fetch upstream
git checkout -b dev/pulsar_output upstream/dev/pulsar_output
git merge upstream/main
git push upstream dev/pulsar_output

mergify[bot] avatar Feb 05 '24 14:02 mergify[bot]

This pull request does not have a backport label. If this is a bug or security fix, could you label this PR @dao-jun? 🙏. For such, you'll need to label your PR with:

  • The upcoming major version of the Elastic Stack
  • The upcoming minor version of the Elastic Stack (if you're not pushing a breaking change)

To fixup this pull request, you need to add the backport labels for the needed branches, such as:

  • backport-v8./d.0 is the label to automatically backport to the 8./d branch. /d is the digit

mergify[bot] avatar Feb 05 '24 14:02 mergify[bot]

@cmacknz could you please plan to have another look here?

pierrehilbert avatar Mar 07 '24 15:03 pierrehilbert

Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane)

elasticmachine avatar Apr 29 '24 19:04 elasticmachine

@dao-jun Please rebase this PR on main and address conflicts. Thanks!

ycombinator avatar May 15 '24 21:05 ycombinator

@ycombinator Resolved, but there is an error image What does it mean?

dao-jun avatar May 16 '24 08:05 dao-jun

@ycombinator Resolved, but there is an error image What does it mean?

It means the NOTICE.txt file needs to be regenerated. For that, please run make update and the commit the changes. Thanks!

ycombinator avatar May 16 '24 21:05 ycombinator

@ycombinator Resolved, but there is an error image What does it mean?

It means the NOTICE.txt file needs to be regenerated. For that, please run make update and the commit the changes. Thanks!

Oh, yes, I remember now, since this PR pending for a long time, I forget I need to update the NOTICE.txt file

dao-jun avatar May 17 '24 04:05 dao-jun

@ycombinator It seems the ci checks passed, can we keep going on the PR?

dao-jun avatar May 17 '24 09:05 dao-jun

buildkite test this

ycombinator avatar May 17 '24 20:05 ycombinator

This pull request is now in conflicts. Could you fix it? 🙏 To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/

git fetch upstream
git checkout -b dev/pulsar_output upstream/dev/pulsar_output
git merge upstream/main
git push upstream dev/pulsar_output

mergify[bot] avatar May 21 '24 17:05 mergify[bot]