ribbybibby / s3_exporter

Exports Prometheus metrics about S3 buckets and objects
Apache License 2.0
105 stars 42 forks source link

Add AWS_REGION as parameter #43

Open thazlett opened 2 years ago

thazlett commented 2 years ago

Looking at the code it doesn't seem like this is a thing already.

Would it be possible to add the AWS_REGION is a URL parameter?

This would allow a single Prometheus job to scrape information about buckets in multiple regions from a single exporter. It seems that at the moment, you need to have an s3_exporter instance per aws region you have buckets of interest in.

Something like: http://127.0.0.1:9340/probe?bucket=bucket-in-eu-west-1&prefix=bla&region=eu-west-1 http://127.0.0.1:9340/probe?bucket=bucket-in-eu-west-2&prefix=bla&region=eu-west-2

A job config target would look like this:

Really like this exporter!