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

add_process_metadata: Support different integer types for pid field #26829

Merged
merged 5 commits into from Jul 12, 2021

Conversation

adriansr
Copy link
Contributor

@adriansr adriansr commented Jul 9, 2021

What does this PR do?

Fixes a bug with the add_process_metadata processor where sometimes the lookup PID specified in match_pids cannot be parsed even if it's a valid integer. This is caused by the processor expecting the field to be of int type, while depending on how the field is populated, it can be other types, usually an int64 if the source is a json document.

Why is it important?

It prevents an error while using the processor.

It's been reported here: https://discuss.elastic.co/t/add-process-metadata-cannot-parse-pid-in-integer/263380
and experienced by me while populating a dummy pid field using add_fields processor, for testing.

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.

Logs

Related issues

@adriansr adriansr added bug Filebeat Filebeat Team:Security-External Integrations backport-v7.13.0 Automated backport with mergify backport-v7.14.0 Automated backport with mergify backport-v7.15.0 Automated backport with mergify labels Jul 9, 2021
@elasticmachine
Copy link
Collaborator

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

@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 Jul 9, 2021
@elasticmachine
Copy link
Collaborator

elasticmachine commented Jul 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 preview

Expand to view the summary

Build stats

  • Start Time: 2021-07-11T14:45:25.546+0000

  • Duration: 63 min 41 sec

  • Commit: b84335e

Test stats 🧪

Test Results
Failed 0
Passed 110
Skipped 0
Total 110

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 110
Skipped 0
Total 110

@adriansr
Copy link
Contributor Author

/test

@adriansr adriansr merged commit 7be6e5e into elastic:master Jul 12, 2021
@adriansr adriansr deleted the add_process_metadata_pid_field branch July 12, 2021 07:36
mergify bot pushed a commit that referenced this pull request Jul 12, 2021
…26829)

Fixes a bug with the add_process_metadata processor where sometimes the
lookup PID specified in match_pids cannot be parsed even if it's a valid
integer. This is caused by the processor expecting the field to be of int
type, while depending on how the field is populated, it can be other
types, usually an int64 if the source is a json document.

Fixes #26830

(cherry picked from commit 7be6e5e)
mergify bot pushed a commit that referenced this pull request Jul 12, 2021
…26829)

Fixes a bug with the add_process_metadata processor where sometimes the
lookup PID specified in match_pids cannot be parsed even if it's a valid
integer. This is caused by the processor expecting the field to be of int
type, while depending on how the field is populated, it can be other
types, usually an int64 if the source is a json document.

Fixes #26830

(cherry picked from commit 7be6e5e)
mergify bot pushed a commit that referenced this pull request Jul 12, 2021
…26829)

Fixes a bug with the add_process_metadata processor where sometimes the
lookup PID specified in match_pids cannot be parsed even if it's a valid
integer. This is caused by the processor expecting the field to be of int
type, while depending on how the field is populated, it can be other
types, usually an int64 if the source is a json document.

Fixes #26830

(cherry picked from commit 7be6e5e)
adriansr added a commit that referenced this pull request Jul 12, 2021
…26829)

Fixes a bug with the add_process_metadata processor where sometimes the
lookup PID specified in match_pids cannot be parsed even if it's a valid
integer. This is caused by the processor expecting the field to be of int
type, while depending on how the field is populated, it can be other
types, usually an int64 if the source is a json document.

Fixes #26830

(cherry picked from commit 7be6e5e)
adriansr added a commit that referenced this pull request Jul 12, 2021
…26829) (#26836)

Fixes a bug with the add_process_metadata processor where sometimes the
lookup PID specified in match_pids cannot be parsed even if it's a valid
integer. This is caused by the processor expecting the field to be of int
type, while depending on how the field is populated, it can be other
types, usually an int64 if the source is a json document.

Fixes #26830

(cherry picked from commit 7be6e5e)

Co-authored-by: Adrian Serrano <adrisr83@gmail.com>
adriansr added a commit that referenced this pull request Jul 12, 2021
…26829) (#26838)

Fixes a bug with the add_process_metadata processor where sometimes the
lookup PID specified in match_pids cannot be parsed even if it's a valid
integer. This is caused by the processor expecting the field to be of int
type, while depending on how the field is populated, it can be other
types, usually an int64 if the source is a json document.

Fixes #26830

(cherry picked from commit 7be6e5e)

Co-authored-by: Adrian Serrano <adrisr83@gmail.com>
adriansr added a commit that referenced this pull request Jul 13, 2021
…26829) (#26837)

Fixes a bug with the add_process_metadata processor where sometimes the
lookup PID specified in match_pids cannot be parsed even if it's a valid
integer. This is caused by the processor expecting the field to be of int
type, while depending on how the field is populated, it can be other
types, usually an int64 if the source is a json document.

Fixes #26830

(cherry picked from commit 7be6e5e)

Co-authored-by: Adrian Serrano <adrisr83@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-v7.13.0 Automated backport with mergify backport-v7.14.0 Automated backport with mergify backport-v7.15.0 Automated backport with mergify bug Filebeat Filebeat
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add_process_metadata fails to parse pid from valid integer fields
3 participants