Ad Widget

Collapse

AWS S3 by HTTP not working?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Javivu
    Junior Member
    • Aug 2023
    • 12

    #16
    Only for testing, a "patch" or "workaround" if you dont need filter_id in Amazon S3, do this changes in:
    • Template: AWS S3 bucket by HTTP
    • Item: AWS S3: Get metrics data
    • Script: modifies:
    Code:
    try {
        AWS.setParams(JSON.parse(value));
        var region = AWS.getBucketLocation(AWS.params.bucket_name),
              metrics = AWS.getMetricsData(region),
              filter_id = AWS.getBucketFilterId(AWS.params.bucket_name, region);
        return JSON.stringify({ metrics, filter_id });
    }​
    With this code:
    Code:
    try {
        AWS.setParams(JSON.parse(value));
        var region = AWS.getBucketLocation(AWS.params.bucket_name),
              metrics = AWS.getMetricsData(region);
        return JSON.stringify({ metrics });
    }​

    Bye

    Comment

    • Markku
      Senior Member
      Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
      • Sep 2018
      • 1781

      #17
      Btw did you do this (just checking as you didn't specifically mention it I think):

      To gather Request metrics, enable Requests metrics on your Amazon S3 buckets from the AWS console.​
      And, did your changes above lead to your metrics working?

      Markku

      Comment

      • Javivu
        Junior Member
        • Aug 2023
        • 12

        #18
        Yes correct, I had it activated. By "deleting" the query that gave an error (AWS.getBucketFilterId), the data is obtained correctly: bucket objects and storage​

        Comment

        Working...