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] sync checkpoint module with Fleet integration #31076

Merged

Conversation

andrewkroh
Copy link
Member

@andrewkroh andrewkroh commented Mar 31, 2022

What does this PR do?

This adds network.transport to events derived from the IANA number. It brings in the change related to elastic/integrations#2463.

The Filebeat module was missing definitions for these four fields.

  • checkpoint.comment
  • checkpoint.conn_direction
  • checkpoint.db_ver
  • checkpoint.update_status

On difference between Fleet and Filebeat is that the Filebeat pipeline is setting client and server based on the source and destination. That behavior was kept. Another difference is event.ingested is required in the Filebeat version of the pipeline. Otherwise the pipelines are the same.

This commit was used:

elastic/integrations@2aee5ee

Filebeat had some ~10000 test log lines, but only the first 100 are checked in test_modules.py so I removed 9900 of them.

Why is it important?

Consistency is nice.

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.

Note to reviewers

I think it would be easier to review the diff commit by commit. And turn off whitespace for the pipeline YAML diff.

Related issues

@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Mar 31, 2022
@mergify
Copy link
Contributor

mergify bot commented Mar 31, 2022

This pull request does not have a backport label. Could you fix it @andrewkroh? 🙏
To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-v./d./d./d is the label to automatically backport to the 7./d branch. /d is the digit

NOTE: backport-skip has been added to this pull request.

@mergify mergify bot added the backport-skip Skip notification from the automated backport with mergify label Mar 31, 2022
@andrewkroh andrewkroh force-pushed the feature/filebeat/sync-check-point branch from b2d6183 to 11a6a6a Compare March 31, 2022 01:49
@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Mar 31, 2022
@mergify mergify bot removed the backport-skip Skip notification from the automated backport with mergify label Mar 31, 2022
@andrewkroh andrewkroh marked this pull request as ready for review March 31, 2022 01:55
@andrewkroh andrewkroh requested review from a team as code owners March 31, 2022 01:55
@elasticmachine
Copy link
Collaborator

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

@elasticmachine
Copy link
Collaborator

elasticmachine commented Mar 31, 2022

💚 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: 2022-04-04T21:05:32.193+0000

  • Duration: 68 min 10 sec

Test stats 🧪

Test Results
Failed 0
Passed 6191
Skipped 728
Total 6919

💚 Flaky test report

Tests succeeded.

🤖 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!)

@andrewkroh andrewkroh marked this pull request as draft March 31, 2022 04:42
The Filebeat module was missing definitions for these four fields.

- checkpoint.comment
- checkpoint.conn_direction
- checkpoint.db_ver
- checkpoint.update_status

The Filebeat pipeline is setting client and server based on the source and destination.
That behavior was kept. Otherwise the pipelines are the same.

This commit was used:

elastic/integrations@2aee5ee
@andrewkroh andrewkroh force-pushed the feature/filebeat/sync-check-point branch from cfe7fdd to 81bbaa2 Compare March 31, 2022 04:52
@andrewkroh andrewkroh marked this pull request as ready for review March 31, 2022 04:52
andrewkroh added a commit to elastic/integrations that referenced this pull request Mar 31, 2022
According to https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk144192, Check Point module field checkpoint.source_object should be mapped as a string type instead of integer.

Syncs change from: elastic/beats@a5e6e5b

Relates: elastic/beats#25124

Other changes:

- use ECS `log.file.path`
- add `event.original` mapping
- sort fields.yml by field name

This was observed while preparing elastic/beats#31076.
The same field is defined in the CEF module which also supports Check Point data.
@andrewkroh
Copy link
Member Author

andrewkroh commented Mar 31, 2022

At this point the failures appear to be caused by to the fact that Beats main branch now requires 8.3.0 ES versions for testing purposes (due to output.elasticsearch.allow_older_versions: false). So until there is an 8.3.0-SNAPSHOT build AND beats is updated to use it, then this will not pass.

@v1v
Copy link
Member

v1v commented Apr 4, 2022

/test

2 similar comments
@v1v
Copy link
Member

v1v commented Apr 4, 2022

/test

@v1v
Copy link
Member

v1v commented Apr 4, 2022

/test

@cmacknz cmacknz removed the request for review from a team April 4, 2022 18:26
@v1v
Copy link
Member

v1v commented Apr 4, 2022

/test

@v1v
Copy link
Member

v1v commented Apr 4, 2022

/test

@andrewkroh
Copy link
Member Author

@Mergifyio update

@mergify
Copy link
Contributor

mergify bot commented Apr 4, 2022

update

✅ Branch has been successfully updated

@@ -19,5 +19,5 @@ func init() {
// AssetCheckpoint returns asset data.
// This is the base64 encoded zlib format compressed contents of module/checkpoint.
func AssetCheckpoint() string {
Copy link
Contributor

Choose a reason for hiding this comment

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

It would be a great thing to have this embedded using embed and not requiring base64 </random-thoughts>.

Copy link
Member Author

Choose a reason for hiding this comment

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

Agree.

Comment on lines -28 to -31
- add_fields:
target: ''
fields:
ecs.version: 1.12.0
Copy link
Contributor

Choose a reason for hiding this comment

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

What was this?

Copy link
Member Author

Choose a reason for hiding this comment

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

It added ecs.version to the outgoing event. This is now being set as part of the ingest pipeline with a set processor.

@andrewkroh andrewkroh merged commit e999979 into elastic:main Apr 5, 2022
emilioalvap pushed a commit to emilioalvap/beats that referenced this pull request Apr 6, 2022
* Sync Check Point module with Fleet integration

The Filebeat module was missing definitions for these four fields.

- checkpoint.comment
- checkpoint.conn_direction
- checkpoint.db_ver
- checkpoint.update_status

The Filebeat pipeline is setting client and server based on the source and destination.
That behavior was kept. Otherwise the pipelines are the same.

This commit was used:

elastic/integrations@2aee5ee

* Add overwrite: true for checkpoint.update_status

The same field is defined in the CEF module which also supports Check Point data.
kush-elastic pushed a commit to kush-elastic/beats that referenced this pull request May 2, 2022
* Sync Check Point module with Fleet integration

The Filebeat module was missing definitions for these four fields.

- checkpoint.comment
- checkpoint.conn_direction
- checkpoint.db_ver
- checkpoint.update_status

The Filebeat pipeline is setting client and server based on the source and destination.
That behavior was kept. Otherwise the pipelines are the same.

This commit was used:

elastic/integrations@2aee5ee

* Add overwrite: true for checkpoint.update_status

The same field is defined in the CEF module which also supports Check Point data.
chrisberkhout pushed a commit that referenced this pull request Jun 1, 2023
* Sync Check Point module with Fleet integration

The Filebeat module was missing definitions for these four fields.

- checkpoint.comment
- checkpoint.conn_direction
- checkpoint.db_ver
- checkpoint.update_status

The Filebeat pipeline is setting client and server based on the source and destination.
That behavior was kept. Otherwise the pipelines are the same.

This commit was used:

elastic/integrations@2aee5ee

* Add overwrite: true for checkpoint.update_status

The same field is defined in the CEF module which also supports Check Point data.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-v8.3.0 Automated backport with mergify Filebeat Filebeat
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants