Skip to content

[aws][1password] Fix field conflicts #2687

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

Merged
merged 11 commits into from
Mar 2, 2022

Conversation

legoguy1000
Copy link
Contributor

@legoguy1000 legoguy1000 commented Feb 12, 2022

What does this PR do?

Resolve field conflicts.

NOTE: The first three commits only contain formatting changes and can be verified via git-generate. It's recommended that you ignore those during the review.

Data Stream Changes

1password.item_usages

  • event.created - keyword -> date (per ECS)

1password.signin_attempts

  • event.created - keyword -> date (per ECS)

aws.elb_logs

  • source.port - keyword to long (per ECS)
  • tracing.trace.id renamed to trace.id (per ECS)
  • Add missing ECS mappings for several destination, source, event, and http fields.

azure.auditlogs

  • client.ip - keyword to ip (per ECS)

azure.eventhub

  • azure-eventhub.offset - keyword to long
  • azure-eventhub.sequence_number - keyword to long

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.

Related issues

@elasticmachine
Copy link

elasticmachine commented Feb 12, 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-02-24T02:41:08.817+0000

  • Duration: 38 min 59 sec

Test stats 🧪

Test Results
Failed 0
Passed 436
Skipped 0
Total 436

🤖 GitHub comments

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

  • /test : Re-trigger the build.

@andrewkroh
Copy link
Member

/test

@legoguy1000
Copy link
Contributor Author

@andrewkroh Should be gtg

@andrewkroh
Copy link
Member

/test

@andrewkroh andrewkroh added bug Something isn't working, use only for issues Integration:1password 1Password (Partner supported) Integration:aws AWS Integration:azure Azure Logs labels Feb 17, 2022
andrewkroh
andrewkroh previously approved these changes Feb 17, 2022
Copy link
Member

@andrewkroh andrewkroh left a comment

Choose a reason for hiding this comment

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

Thanks. I expanded the PR description with a list of changes to help the other reviewers.

@andrewkroh
Copy link
Member

Looks like the aws.elb_logs needs a convert processor for the port values.

[1] parsing field value failed: field "source.port"'s Go type, string, does not match the expected field type: long (field value: 2817)

@andrewkroh andrewkroh dismissed their stale review February 17, 2022 15:09

CI errors

@andrewkroh andrewkroh requested a review from a team February 17, 2022 15:11
@andrewkroh
Copy link
Member

@elastic/integrations can you please review the AWS and Azure fixes.

@elasticmachine
Copy link

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

@kaiyan-sheng
Copy link
Contributor

Thanks for the fix!! @andrewkroh Is this considered breaking change for users who already have these integrations installed?

@andrewkroh
Copy link
Member

@kaiyan-sheng I'd consider this a bugfix because the data didn't comply with ECS. Fleet will rollover their data streams given the change to the template and this will prevent mapping conflicts, but there will be a Kibana index pattern conflict for the between the old data and the new data. At least now the new data from these integrations will not conflict with each other in the logs-* index pattern.

@legoguy1000 legoguy1000 requested review from andrewkroh and removed request for a team February 18, 2022 13:19
@andrewkroh
Copy link
Member

/test

1 similar comment
@efd6
Copy link
Contributor

efd6 commented Feb 23, 2022

/test

[git-generate]
cd packages/aws
elastic-package test pipeline -g
@elastic elastic deleted a comment from mergify bot Feb 24, 2022
@andrewkroh
Copy link
Member

I rebased this so that we can review the fixes separately from the formatting updates to the expected JSON pipeline test files.

@legoguy1000
Copy link
Contributor Author

@andrewkroh thanks. Apologies for not staying on this, been super busy at work.

@andrewkroh
Copy link
Member

No worries! We realize you have a two jobs working here and there 😉 .

andrewkroh and others added 10 commits February 23, 2022 21:30
[git-generate]
cd packages/azure
elastic-package test pipeline -g
[git-generate]
cd packages/1password
elastic-package test pipeline -g
[git-generate]
cd packages/aws/data_stream/elb_logs
jq .expected[0] _dev/test/pipeline/test-alb.log-expected.json > sample_event.json
elastic-package format
@andrewkroh
Copy link
Member

/test

Copy link
Member

@andrewkroh andrewkroh left a comment

Choose a reason for hiding this comment

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

LGTM. Approving on behalf of elastic/security-external-integrations.

@elastic/integrations, can you please add your review for the aws and azure changes.

@andrewkroh andrewkroh requested a review from a team February 24, 2022 03:26
Copy link
Contributor

@kaiyan-sheng kaiyan-sheng left a comment

Choose a reason for hiding this comment

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

aws and azure looks good. Thanks!

@nicpenning
Copy link
Contributor

How should we handle other field conflicts such as this? New issue?

event.duration is another one for the azure integration:

This is a long everywhere else besides the azure activity logs.

{
".ds-logs-azure.activitylogs-default-2022.03.23-000001" : {
"mappings" : {
"event.duration" : {
"full_name" : "event.duration",
"mapping" : {
"duration" : {
"type" : "keyword",
"ignore_above" : 1024
}
}
}
}
},

@legoguy1000
Copy link
Contributor Author

I would do a new issue since this was already merged

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:aws AWS Integration:azure Azure Logs Integration:1password 1Password (Partner supported) Team:Integrations Label for the Integrations team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[8.0] AWS & 1Password Integrations are creating Index field conflicts [azure] Mapping conflicts in Azure Fleet Integrations
6 participants