Skip to content

[GCP] Add cloudsql data streams - #4126

Merged
29 commits merged into
mainfrom
unknown repository
Jul 20, 2023
Merged

[GCP] Add cloudsql data streams#4126
29 commits merged into
mainfrom
unknown repository

Conversation

@ghost

@ghost ghost commented Sep 5, 2022

Copy link
Copy Markdown

What does this PR do?

Adds CloudSQL data streams:

  • MySQL
  • PostgreSQL
  • SQLServer

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.

Author's Checklist

  • [ ]

How to test this PR locally

Related issues

Screenshots

@elasticmachine

elasticmachine commented Sep 5, 2022

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-07-20T22:02:17.948+0000

  • Duration: 18 min 46 sec

Test stats 🧪

Test Results
Failed 0
Passed 64
Skipped 0
Total 64

🤖 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 Sep 5, 2022

Copy link
Copy Markdown

🌐 Coverage report

Name Metrics % (covered/total) Diff
Packages 100.0% (6/6) 💚
Files 100.0% (6/6) 💚
Classes 100.0% (6/6) 💚
Methods 87.826% (101/115) 👎 -12.174
Lines 96.0% (1464/1525) 👍 9.169
Conditionals 100.0% (0/0) 💚
@ghost ghost mentioned this pull request Sep 14, 2022
6 tasks
@ghost
ghost marked this pull request as ready for review September 14, 2022 11:03
@ghost
ghost requested review from a team as code owners September 14, 2022 11:03
@ghost

ghost commented Sep 16, 2022

Copy link
Copy Markdown
Author

/test

@elasticmachine

elasticmachine commented Sep 16, 2022

Copy link
Copy Markdown

🚀 Benchmarks report

To see the full report comment with /test benchmark fullreport

@endorama endorama added Integration:gcp Google Cloud Platform Team:Cloud-Monitoring Label for the Cloud Monitoring team labels Sep 23, 2022
@botelastic

botelastic Bot commented Nov 7, 2022

Copy link
Copy Markdown

Hi! We just realized that we haven't looked into this PR in a while. We're sorry! We're labeling this issue as Stale to make it hit our filters and make sure we get back to it as soon as possible. In the meantime, it'd be extremely helpful if you could take a look at it as well and confirm its relevance. A simple comment with a nice emoji will be enough :+1. Thank you for your contribution!

@botelastic botelastic Bot added the Stalled label Nov 7, 2022
@endorama

Copy link
Copy Markdown
Contributor

@gpop63 does this PR requires elastic/beats#33066?

@botelastic botelastic Bot removed the Stalled label Nov 14, 2022
@ghost

ghost commented Nov 14, 2022

Copy link
Copy Markdown
Author

Yes, we should first merge the CloudSQL Metadata PR (elastic/beats#33066)) and then this one, because we need the metadata to identify which database type generated events.

@endorama

Copy link
Copy Markdown
Contributor

elastic/beats#33066 has been merged, so we can move forward with this once 8.6.0 is out.

@botelastic

botelastic Bot commented Jan 14, 2023

Copy link
Copy Markdown

Hi! We just realized that we haven't looked into this PR in a while. We're sorry! We're labeling this issue as Stale to make it hit our filters and make sure we get back to it as soon as possible. In the meantime, it'd be extremely helpful if you could take a look at it as well and confirm its relevance. A simple comment with a nice emoji will be enough :+1. Thank you for your contribution!

@botelastic botelastic Bot added the Stalled label Jan 14, 2023
@botelastic

botelastic Bot commented Feb 13, 2023

Copy link
Copy Markdown

Hi! This PR has been stale for a while and we're going to close it as part of our cleanup procedure. We appreciate your contribution and would like to apologize if we have not been able to review it, due to the current heavy load of the team. Feel free to re-open this PR if you think it should stay open and is worth rebasing. Thank you for your contribution!

@botelastic botelastic Bot closed this Feb 13, 2023
@endorama endorama reopened this Feb 13, 2023
@botelastic botelastic Bot removed the Stalled label Feb 13, 2023
@botelastic

botelastic Bot commented Mar 15, 2023

Copy link
Copy Markdown

Hi! We just realized that we haven't looked into this PR in a while. We're sorry! We're labeling this issue as Stale to make it hit our filters and make sure we get back to it as soon as possible. In the meantime, it'd be extremely helpful if you could take a look at it as well and confirm its relevance. A simple comment with a nice emoji will be enough :+1. Thank you for your contribution!

@botelastic botelastic Bot added the Stalled label Mar 15, 2023
@botelastic botelastic Bot removed the Stalled label Mar 23, 2023
@rameshelastic rameshelastic assigned ghost May 24, 2023
@botelastic

botelastic Bot commented Jun 23, 2023

Copy link
Copy Markdown

Hi! We just realized that we haven't looked into this PR in a while. We're sorry! We're labeling this issue as Stale to make it hit our filters and make sure we get back to it as soon as possible. In the meantime, it'd be extremely helpful if you could take a look at it as well and confirm its relevance. A simple comment with a nice emoji will be enough :+1. Thank you for your contribution!

@botelastic botelastic Bot added the Stalled label Jun 23, 2023
@botelastic botelastic Bot removed the Stalled label Jul 17, 2023

@endorama endorama left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Just a minor comment but looks good!

processors:
- drop:
description: Drop if database is not MySQL.
if: "ctx?.gcp?.labels?.cloudsql?.name != 'mysql'"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

One thing I think will be useful in the future is to document how we built this check. Is not very clear where this label come from, if it can change or not and where to check in case this pipeline stops working.

Please document this in the cloudsql.md file for future reference.

processors:
- drop:
description: Drop if database is not PostgreSQL.
if: "ctx?.gcp?.labels?.cloudsql?.name != 'postgres'"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Same for this check.

processors:
- drop:
description: Drop if database is not SQLServer.
if: "ctx?.gcp?.labels?.cloudsql?.name != 'sqlserver'"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Same for this check.

@ghost
ghost merged commit 27e77c6 into elastic:main Jul 20, 2023
@elasticmachine

Copy link
Copy Markdown

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

orestisfl pushed a commit to orestisfl/integrations that referenced this pull request May 15, 2026
* add cloudsql mysql data stream

* add cloudsql postgresql data stream

* add cloudsql sqlserver data stream

* add cloudsql docs

* add changelog and cloudsql policy template

* bump manifest version

* add mysql ingest pipeline

* add postgresql ingest pipeline

* add sql server ingest pipeline

* add mysql datastream suffixes, units and metric_types
add drop processor if database is not mysql

* add postgres datastream suffixes, units and metric_types
add drop processor if database is not postgres

* add sqlserver datastream suffixes, units and metric_types
add drop processor if database is not sqlserver

* update cloudsql docs

* bump package version

* fix field types

* update docs

* remove duplicated fields from agent due to elastic-package check

---------

Co-authored-by: Edoardo Tenani <526307+endorama@users.noreply.github.com>
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Integration:gcp Google Cloud Platform Team:Cloud-Monitoring Label for the Cloud Monitoring team

3 participants