ribbybibby / s3_exporter

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

Service discovery for buckets #17

Closed ribbybibby closed 3 years ago

ribbybibby commented 3 years ago

Idea: a subcommand that runs a daemon that will collect bucket/prefix combinations dynamically and write them out to a file in a format for consumption by file_sd_configs.

The buckets could be discovered via patterns, i.e --bucket=* or --bucket=my-org-*. The prefix could be taken from tags on the bucket?

ribbybibby commented 3 years ago

Prometheus recently added support for generic HTTP service discovery mechanisms, this makes this a whole lot easier.

I've implemented it in https://github.com/ribbybibby/s3_exporter/pull/27.