-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Support Amazon Simple Storage Service (AWS S3) metrics monitoring #10407
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
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
b55ff6b
Support Amazon Simple Storage Service (Amazon S3) metrics monitoring
pg-yang 7a189c4
revert FirehoseHTTPHandler.java
pg-yang 2f6f434
Update docs/en/setup/backend/backend-aws-s3-monitoring.md
wu-sheng 456f2a3
revert opentelemetry-receiver.md
pg-yang 7b75b40
Update oap-server/server-starter/src/main/resources/otel-rules/aws-s3…
pg-yang 9db1b95
update s3 test case -> aws-s3::skywalking
pg-yang 860b6e2
update layer
pg-yang File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| # AWS Cloud S3 monitoring | ||
| Amazon Simple Storage Service (Amazon S3) is an object storage service. SkyWalking leverages [AWS Kinesis Data Firehose receiver](./aws-firehose-receiver.md) to transfer the CloudWatch metrics of s3 to | ||
| [OpenTelemetry receiver](opentelemetry-receiver.md) and into the [Meter System](./../../concepts-and-designs/meter.md). | ||
|
|
||
| ### Data flow | ||
| 1. AWS CloudWatch collect metrics for S3, refer to [S3 monitoring with CloudWatch](https://docs.aws.amazon.com/AmazonS3/latest/userguide/cloudwatch-monitoring.html) | ||
| 2. [CloudWatch metric streams](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Metric-Streams.html) stream CloudWatch metrics of S3 to AWS Kinesis Data Firehose | ||
| 3. AWS Kinesis Data Firehose delivery metrics to [AWS Kinesis Data Firehose receiver](./aws-firehose-receiver.md) through the HTTP endpoint | ||
|
|
||
| ### Set up | ||
| 1. Create CloudWatch metrics configuration for S3, refer to [S3 metrics configuration](https://docs.aws.amazon.com/AmazonS3/latest/userguide/metrics-configurations.html) | ||
| 2. Create an Amazon Kinesis Data Firehose Delivery Stream, and set [AWS Kinesis Data Firehose receiver](./aws-firehose-receiver.md)'s address as HTTP(s) Destination, refer to [Create Delivery Stream](https://docs.aws.amazon.com/firehose/latest/dev/basic-create.html) | ||
| 3. Create CloudWatch metric stream, and select the Firehose Delivery Stream which has been created above, set `Select namespaces` to `AWS/S3`, `Select output format` to `OpenTelemetry 0.7`. refer to [CloudWatch Metric Streams](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Metric-Streams.html) | ||
|
|
||
| ### S3 Monitoring | ||
|
|
||
| SkyWalking observes CloudWatch metrics of the S3 bucket, which is cataloged as a `LAYER: AWS_S3` `Service` in the OAP. | ||
|
|
||
| #### Supported Metrics | ||
|
|
||
| | Monitoring Panel | Unit | Metric Name | Catalog | Description | Data Source | | ||
| |----------------------------|-------|-----------------------------|----------------|--------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------| | ||
| | 4xx Errors | count | aws_s3_4xx | Service | The number of HTTP 4xx client error status code requests made to the S3 bucket | [S3 monitoring with CloudWatch](https://docs.aws.amazon.com/AmazonS3/latest/userguide/cloudwatch-monitoring.html) | | ||
| | 5xx Errors | count | aws_s3_5xx | Service | The number of HTTP 5xx client error status code requests made to the S3 bucket | [S3 monitoring with CloudWatch](https://docs.aws.amazon.com/AmazonS3/latest/userguide/cloudwatch-monitoring.html) | | ||
| | Downloaded | bytes | aws_s3_downloaded_bytes | Service | The number of bytes downloaded for requests made to an Amazon S3 bucket | [S3 monitoring with CloudWatch](https://docs.aws.amazon.com/AmazonS3/latest/userguide/cloudwatch-monitoring.html) | | ||
| | Uploaded | bytes | aws_s3_uploaded_bytes | Service | The number of bytes uploaded for requests made to an Amazon S3 bucket | [S3 monitoring with CloudWatch](https://docs.aws.amazon.com/AmazonS3/latest/userguide/cloudwatch-monitoring.html) | | ||
| | Request Average Latency | bytes | aws_s3_request_latency | Service | The average of elapsed per-request time from the first byte received to the last byte sent to an Amazon S3 bucket | [S3 monitoring with CloudWatch](https://docs.aws.amazon.com/AmazonS3/latest/userguide/cloudwatch-monitoring.html) | | ||
| | First Byte Average Latency | bytes | aws_s3_request_latency | Service | The average of per-request time from the complete request being received by an Amazon S3 bucket to when the response starts to be returned | [S3 monitoring with CloudWatch](https://docs.aws.amazon.com/AmazonS3/latest/userguide/cloudwatch-monitoring.html) | | ||
| | All Requests | bytes | aws_s3_delete_requests | Service | The number of HTTP All requests made for objects in an Amazon S3 bucket | [S3 monitoring with CloudWatch](https://docs.aws.amazon.com/AmazonS3/latest/userguide/cloudwatch-monitoring.html) | | ||
| | Get Requests | bytes | aws_s3_delete_requests | Service | The number of HTTP Get requests made for objects in an Amazon S3 bucket | [S3 monitoring with CloudWatch](https://docs.aws.amazon.com/AmazonS3/latest/userguide/cloudwatch-monitoring.html) | | ||
| | Put Requests | bytes | aws_s3_delete_requests | Service | The number of HTTP PUT requests made for objects in an Amazon S3 bucket | [S3 monitoring with CloudWatch](https://docs.aws.amazon.com/AmazonS3/latest/userguide/cloudwatch-monitoring.html) | | ||
| | Delete Requests | bytes | aws_s3_delete_requests | Service | The number of HTTP Delete requests made for objects in an Amazon S3 bucket | [S3 monitoring with CloudWatch](https://docs.aws.amazon.com/AmazonS3/latest/userguide/cloudwatch-monitoring.html) | | ||
|
|
||
| ### Customizations | ||
| You can customize your own metrics/expression/dashboard panel. | ||
| The metrics definition and expression rules are found in `/config/otel-rules/aws-s3/`. | ||
| The AWS Cloud EKS dashboard panel configurations are found in `/config/ui-initialized-templates/aws_s3`. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
oap-server/server-starter/src/main/resources/otel-rules/aws-s3/s3-service.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| # Licensed to the Apache Software Foundation (ASF) under one or more | ||
| # contributor license agreements. See the NOTICE file distributed with | ||
| # this work for additional information regarding copyright ownership. | ||
| # The ASF licenses this file to You under the Apache License, Version 2.0 | ||
| # (the "License"); you may not use this file except in compliance with | ||
| # the License. You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| # This will parse a textual representation of a duration. The formats | ||
| # accepted are based on the ISO-8601 duration format {@code PnDTnHnMn.nS} | ||
| # with days considered to be exactly 24 hours. | ||
| # <p> | ||
| # Examples: | ||
| # <pre> | ||
| # "PT20.345S" -- parses as "20.345 seconds" | ||
| # "PT15M" -- parses as "15 minutes" (where a minute is 60 seconds) | ||
| # "PT10H" -- parses as "10 hours" (where an hour is 3600 seconds) | ||
| # "P2D" -- parses as "2 days" (where a day is 24 hours or 86400 seconds) | ||
| # "P2DT3H4M" -- parses as "2 days, 3 hours and 4 minutes" | ||
| # "P-6H3M" -- parses as "-6 hours and +3 minutes" | ||
| # "-P6H3M" -- parses as "-6 hours and -3 minutes" | ||
| # "-P-6H+3M" -- parses as "+6 hours and -3 minutes" | ||
| # </pre> | ||
|
|
||
| filter: "{ tags -> {tags.cloud_provider == 'aws' && tags.Namespace == 'AWS/S3' } }" | ||
| expSuffix: tag({tags -> tags.bucket = 'aws-s3::' + tags.BucketName}).service(['bucket'], Layer.AWS_S3) | ||
| metricPrefix: aws_s3 | ||
| metricsRules: | ||
| - name: 4xx | ||
| exp: amazonaws_com_AWS_S3_4xxErrors_sum.downsampling(SUM) | ||
|
pg-yang marked this conversation as resolved.
|
||
| - name: 5xx | ||
| exp: amazonaws_com_AWS_S3_5xxErrors_sum.downsampling(SUM) | ||
| - name: downloaded_bytes | ||
| exp: amazonaws_com_AWS_S3_BytesDownloaded_sum.downsampling(SUM) | ||
| - name: uploaded_bytes | ||
| exp: amazonaws_com_AWS_S3_BytesUploaded_sum.downsampling(SUM) | ||
| - name: request_latency | ||
| exp: amazonaws_com_AWS_S3_TotalRequestLatency_sum.div(amazonaws_com_AWS_S3_TotalRequestLatency_count) | ||
| - name: first_latency_bytes | ||
| exp: amazonaws_com_AWS_S3_FirstByteLatency_sum.div(amazonaws_com_AWS_S3_FirstByteLatency_count) | ||
| - name: all_requests | ||
| exp: amazonaws_com_AWS_S3_AllRequests_sum.downsampling(SUM) | ||
| - name: put_requests | ||
| exp: amazonaws_com_AWS_S3_PutRequests_sum.downsampling(SUM) | ||
| - name: get_requests | ||
| exp: amazonaws_com_AWS_S3_GetRequests_sum.downsampling(SUM) | ||
| - name: delete_requests | ||
| exp: amazonaws_com_AWS_S3_DeleteRequests_sum.downsampling(SUM) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
68 changes: 68 additions & 0 deletions
68
...server/server-starter/src/main/resources/ui-initialized-templates/aws_s3/aws_s3-root.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| /** | ||
| * Licensed to the Apache Software Foundation (ASF) under one or more | ||
| * contributor license agreements. See the NOTICE file distributed with | ||
| * this work for additional information regarding copyright ownership. | ||
| * The ASF licenses this file to You under the Apache License, Version 2.0 | ||
| * (the "License"); you may not use this file except in compliance with | ||
| * the License. You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
|
|
||
| [ | ||
| { | ||
| "id": "AWS_S3-Root", | ||
| "configuration": { | ||
| "children": [ | ||
| { | ||
| "x": 0, | ||
| "y": 2, | ||
| "w": 24, | ||
| "h": 51, | ||
| "i": "0", | ||
| "type": "Widget", | ||
| "widget": { | ||
| "title": "" | ||
| }, | ||
| "graph": { | ||
| "type": "ServiceList", | ||
| "dashboardName": "AWS_S3-service", | ||
| "fontSize": 12, | ||
| "showXAxis": false, | ||
| "showYAxis": false, | ||
| "showGroup": true | ||
| }, | ||
| "moved": false | ||
| }, | ||
| { | ||
| "x": 0, | ||
| "y": 0, | ||
| "w": 24, | ||
| "h": 2, | ||
| "i": "100", | ||
| "type": "Text", | ||
| "graph": { | ||
| "fontColor":"blue", | ||
| "backgroundColor":"white", | ||
| "content":"Provide AWS Cloud S3 monitoring through AWS FireHose Receiver", | ||
| "fontSize":14, | ||
| "textAlign":"left", | ||
| "url":"https://skywalking.apache.org/docs/main/next/en/setup/backend/backend-aws-s3-monitoring/" | ||
| }, | ||
| "moved": false | ||
| } | ||
| ], | ||
| "id": "AWS_S3-Root", | ||
| "layer": "AWS_S3", | ||
| "entity": "All", | ||
| "name": "AWS_S3-Root", | ||
| "isRoot": true | ||
| } | ||
| } | ||
| ] |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.