ribbybibby / s3_exporter

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

select metrics #11

Closed data-dude closed 4 years ago

data-dude commented 4 years ago

It would be nice to select which metrics you want. For example, for some buckets I just want the latest date for a file. All the other metrics I don't need.

data-dude commented 4 years ago

In particular i'd like to filter out this metric - s3_objects_size_sum_bytes. When it gets this value for a bucket with a lot of files it taxes the resources.

ribbybibby commented 4 years ago

I don't think filtering out metrics is going to help much in terms of resource usage. The way the exporter works is that it lists all the objects for a given bucket/prefix and constructs the metrics as it's iterating over the returned objects. I expect that the majority of the resource usage comes from talking to s3 and I don't think excluding the calculations for one metric or another is going to make much of a difference.

data-dude commented 4 years ago

Ok. Thanks for responding