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

[awsfirehose] Add routing rules for metrics ingested from Firehose #9916

Merged
merged 16 commits into from
Jul 11, 2024

Conversation

kaiyan-sheng
Copy link
Contributor

@kaiyan-sheng kaiyan-sheng commented May 17, 2024

Proposed commit message

This PR is to add routing_rules.yml for metrics ingested from Firehose. Without this integration or user specific set the parameter in Firehose, metrics coming into Elasticsearch by default goes to metrics-aws.cloudwatch-default. Idea to reroute is by checking the value of aws.cloudwatch.namespace field in each document to decide which data stream to route the document to. For example if aws.cloudwatch.namespace equals to AWS/EC2, then this document should go to metrics-aws.ec2_metrics-default.

For s3 daily storage and s3 request, we check for the actual metric name. If metric name is either BucketSizeBytes or NumberOfObjects, this document goes to aws.s3_daily_storage. If it's other metric name but still with AWS/S3 namespace, documents go to aws.s3_request.

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 May 17, 2024

🚀 Benchmarks report

To see the full report comment with /test benchmark fullreport

@kaiyan-sheng kaiyan-sheng self-assigned this Jun 13, 2024
@kaiyan-sheng kaiyan-sheng marked this pull request as ready for review June 13, 2024 22:26
@kaiyan-sheng kaiyan-sheng requested a review from a team as a code owner June 13, 2024 22:26
@kaiyan-sheng kaiyan-sheng requested review from a team as code owners July 2, 2024 22:49
@agithomas
Copy link
Contributor

Do you want to consider adding the details of permissions needed, mentioned here?

Copy link
Contributor

@agithomas agithomas left a comment

Choose a reason for hiding this comment

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

In the documentation, i could find the below text

(Optional) To change the output format from the default format for your scenario, choose Change output format. The supported formats are JSON, OpenTelemetry 1.0.0, and OpenTelemetry 0.7.0.

Among these supported formats, which one the user must select?

packages/awsfirehose/manifest.yml Outdated Show resolved Hide resolved
Copy link
Member

@felixbarny felixbarny left a comment

Choose a reason for hiding this comment

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

LGTM. Non-blocking suggestion to add subobjects: false to dimensions.

@kaiyan-sheng
Copy link
Contributor Author

kaiyan-sheng commented Jul 9, 2024

@agithomas Thanks for the review!

Do you want to consider adding the details of permissions needed, mentioned here?

Good point! I will add this in https://github.com/elastic/observability-docs/blob/main/docs/en/observability/cloud-monitoring/aws/monitor-aws-firehose.asciidoc!

In the documentation, i could find the below text
(Optional) To change the output format from the default format for your scenario, choose Change output format. The supported formats are JSON, OpenTelemetry 1.0.0, and OpenTelemetry 0.7.0.
Among these supported formats, which one the user must select?

User must choose JSON or otel 1.0.0! Good point, I need to add it in https://github.com/elastic/observability-docs/blob/main/docs/en/observability/cloud-monitoring/aws/monitor-aws-firehose.asciidoc as well! Thanks!!

Hmm after reviewing the integration, I think these info and more doc needs to be added for this package too. I will update both doc!

@elastic elastic deleted a comment from elasticmachine Jul 9, 2024
Copy link
Contributor

@zmoog zmoog left a comment

Choose a reason for hiding this comment

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

LGTM!

I would only double-check if we can completely leverage ecs@mappings for all remaining fields and drop the ecs.yml files.

Copy link
Contributor

@agithomas agithomas left a comment

Choose a reason for hiding this comment

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

LGTM!

@elasticmachine
Copy link

💚 Build Succeeded

History

cc @kaiyan-sheng

Copy link

Quality Gate failed Quality Gate failed

Failed conditions
2.1% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube

@kaiyan-sheng kaiyan-sheng merged commit 5e25fed into elastic:main Jul 11, 2024
4 of 5 checks passed
@kaiyan-sheng kaiyan-sheng deleted the reroute_metrics branch July 11, 2024 17:01
@elasticmachine
Copy link

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

@andrewkroh andrewkroh added the Integration:awsfirehose Amazon Data Firehose label Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Integration:awsfirehose Amazon Data Firehose
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants