Skip to content

Add missing field definitions for the SQLServer integration - #6264

Merged
chemamartinez merged 5 commits into
elastic:mainfrom
chemamartinez:6070-sqlserver-add-mapping
May 29, 2023
Merged

Add missing field definitions for the SQLServer integration#6264
chemamartinez merged 5 commits into
elastic:mainfrom
chemamartinez:6070-sqlserver-add-mapping

Conversation

@chemamartinez

@chemamartinez chemamartinez commented May 19, 2023

Copy link
Copy Markdown
Contributor

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

elasticmachine commented May 19, 2023

Copy link
Copy Markdown

💚 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

elasticmachine commented May 19, 2023

Copy link
Copy Markdown

🌐 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

P1llus commented May 22, 2023

Copy link
Copy Markdown
Member

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
Copy Markdown
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 May 22, 2023
@chemamartinez

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown

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
Copy Markdown

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
orestisfl pushed a commit to orestisfl/integrations that referenced this pull request May 15, 2026
…6264)

* Adjust mapping of host ECS fields in data streams

* Update changelog

* Add missing fields mapping to performance and transaction_logs datastreams

* Convert host.mac to the expected format

* Update version for Microsoft SQLServer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

5 participants