Skip to main content
Needs Votes

Getting the number of objects in a S3 bucket - Is it possible to specify a folder type?

Related products:Infra Monitoring - Connectors
  • December 20, 2023
  • 3 replies
  • 106 views

Forum|alt.badge.img

Hello,

I'm using Cloud-Aws-S3-Objects-Api-custom (centreon_aws_s3_api.pl) to get the number of objects in an S3 bucket.
That works fine. The problem is when I try to get the number of objects in a top level folder within the bucket. There's no option or parameter to specify the folder I want to read.

 

The host template of the Cloud-Aws-S3-Objects-Api-custom plugin has the argument AWSINSTANCENAME where you can put the name of the bucket (for exemple MyBucket).
But if I try adding the name of the first folder (MyBucket/MyFirstFolder), the plugin manage it as a bucket name so the response is zero objects because it doesn't exist.

I suppose that the plugin's response is coherent because it works with the Cloudwatch metrics and it does not differentiate objects from folders. It only offers the total number of objects in the bucket (actually a folder is another object)

 

I have noticed on Aws that a folder has a S3 URI address, for example S3 URI='s3://MyBucket/MyFirstFolder/' 

Do you know if there's any option in the plugin to specify this argument?

Or if there is another similar plugin that allows a similar argument just to simulate a folder?

Let me know If do you need more details.

Thank you!
Regards.

3 replies

Forum|alt.badge.img+5
  • Centreonian
  • January 16, 2024
NewNeeds Votes

fmattes
Centreonian
Forum|alt.badge.img+10
  • Centreonian
  • January 16, 2024

Hi,

Thanks for your interest in Centreon.

It seems that the plugin need an new option to be able to monitor S3 folder, using URI.


rchauvel
Centreonian
Forum|alt.badge.img+18
  • Centreonian
  • November 20, 2024

@dpinedo don’t forget to vote your own idea...