You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by "wankai123 (via GitHub)" <gi...@apache.org> on 2023/02/19 01:55:24 UTC

[GitHub] [skywalking] wankai123 commented on a diff in pull request #10407: Support Amazon Simple Storage Service (AWS S3) metrics monitoring

wankai123 commented on code in PR #10407:
URL: https://github.com/apache/skywalking/pull/10407#discussion_r1111135545


##########
oap-server/server-starter/src/main/resources/otel-rules/aws-s3/s3-service.yaml:
##########
@@ -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-buckets::' + tags.BucketName}).service(['bucket'], Layer.AWS_S3)
+metricPrefix: aws_s3
+metricsRules:
+  - name: 4xx
+    exp: amazonaws_com_AWS_S3_4xxErrors_sum.downsampling(SUM)

Review Comment:
   From the AWS doc: 
   `Sum (reports per period)`, sorry I didn't found the period‘s definition, could you share here?
   I think downsampling(SUM) could be a issue.
   
   ```
   4xxErrors:
   The number of HTTP 4xx client error status code requests made to an Amazon S3 bucket with a value of either 0 or 1. The Average statistic shows the error rate, and the Sum statistic shows the count of that type of error, during each period.
   
   Units: Count
   
   Valid statistics: Average (reports per request), Sum (reports per period), Min, Max, Sample Count
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org