Skip to content

Add missing field definitions for the SQLServer integration #6264

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 5 commits into from
May 29, 2023

Conversation

chemamartinez
Copy link
Contributor

@chemamartinez chemamartinez commented May 19, 2023

What does this PR do?

It adds the following changes:

Audit data stream

  • Add the requested field definitions. The ones that match ECS are included in ecs.yml. Otherwise, they have been added at agent.yml along with missing fields for cloud and container.
  • Although host.os.name is defined in ECS, it has been included in agent.yml to avoid a conflict in the type of the text multi_field (text vs match_only_text) with the Log data stream.

Log data stream

  • host ECS fields defined at agent.yml have been moved to ecs.yml for consistency.

Performance data stream

  • Added missing cloud and container fields in agent.yml.
  • Added host fields in ecs.yml for consistency.

Transaction logs data stream

  • Added missing cloud and container fields in agent.yml.
  • Added host fields in ecs.yml for consistency.

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

Screenshots

image image

@chemamartinez chemamartinez added the Integration:microsoft_sqlserver Microsoft SQL Server label May 19, 2023
@chemamartinez chemamartinez requested a review from a team May 19, 2023 09:08
@chemamartinez chemamartinez self-assigned this May 19, 2023
@chemamartinez chemamartinez force-pushed the 6070-sqlserver-add-mapping branch from 34847a5 to c5283d7 Compare May 19, 2023 09:15
@chemamartinez chemamartinez marked this pull request as ready for review May 19, 2023 09:16
@chemamartinez chemamartinez requested a review from a team as a code owner May 19, 2023 09:16
@elasticmachine
Copy link

elasticmachine commented May 19, 2023

💚 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-05-26T15:32:18.597+0000

  • Duration: 16 min 4 sec

Test stats 🧪

Test Results
Failed 0
Passed 19
Skipped 0
Total 19

🤖 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

elasticmachine commented May 19, 2023

🌐 Coverage report

Name Metrics % (covered/total) Diff
Packages 100.0% (2/2) 💚
Files 100.0% (2/2) 💚 6.25
Classes 100.0% (2/2) 💚 6.25
Methods 93.75% (30/32) 👍 5.398
Lines 100.0% (1251/1251) 💚 14.075
Conditionals 100.0% (0/0) 💚

@P1llus
Copy link
Member

P1llus commented May 22, 2023

Lets add in some other common agent.yml fields as well, we have some covering add_*_metadata like container and cloud in most of our integrations, compare this with for example checkpoint.

Rest LGTM!

@chemamartinez chemamartinez force-pushed the 6070-sqlserver-add-mapping branch 2 times, most recently from 7e5065b to 1bf4967 Compare May 22, 2023 16:10
@chemamartinez
Copy link
Contributor Author

Lets add in some other common agent.yml fields as well, we have some covering add_*_metadata like container and cloud in most of our integrations, compare this with for example checkpoint.

Rest LGTM!

Thanks for the review. I also realized that the host and message fields were missing in the remaining data streams and the events could contain those fields so I added them as well.

@chemamartinez chemamartinez changed the title Add missing field definitions for Audit data stream in SQLServer integration Add missing field definitions for the SQLServer integration May 22, 2023
@chemamartinez
Copy link
Contributor Author

/test

@chemamartinez chemamartinez force-pushed the 6070-sqlserver-add-mapping branch from 1bf4967 to 601683c Compare May 23, 2023 08:19
@chemamartinez
Copy link
Contributor Author

Found a bug when processing the host.mac field in the log, performance, and transaction_log data streams:

image

so I have added the necessary processors in the ingest pipeline to meet the ECS format in case the field appears: 601683c

@elasticmachine
Copy link

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

@chemamartinez chemamartinez force-pushed the 6070-sqlserver-add-mapping branch from 601683c to a6e019b Compare May 26, 2023 15:16
@chemamartinez chemamartinez requested a review from a team as a code owner May 26, 2023 15:16
@chemamartinez chemamartinez merged commit dfcd397 into elastic:main May 29, 2023
@elasticmachine
Copy link

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

@chemamartinez chemamartinez deleted the 6070-sqlserver-add-mapping branch February 6, 2025 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[microsoft_sqlserver.audit] Conflicting host.ip and message field definition
5 participants