{"id":31715309,"url":"https://github.com/alphahydrae/s3-exporter","last_synced_at":"2025-10-09T01:55:41.108Z","repository":{"id":310712836,"uuid":"1039647055","full_name":"AlphaHydrae/s3-exporter","owner":"AlphaHydrae","description":"Prometheus exporter for AWS S3 buckets","archived":false,"fork":false,"pushed_at":"2025-08-19T20:42:33.000Z","size":141,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-19T20:42:49.497Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AlphaHydrae.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-08-17T17:25:09.000Z","updated_at":"2025-08-19T20:42:38.000Z","dependencies_parsed_at":"2025-08-19T20:43:00.986Z","dependency_job_id":"6e62126c-11db-4bb0-8ffd-6f3c55b5b729","html_url":"https://github.com/AlphaHydrae/s3-exporter","commit_stats":null,"previous_names":["alphahydrae/s3-exporter"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/AlphaHydrae/s3-exporter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlphaHydrae%2Fs3-exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlphaHydrae%2Fs3-exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlphaHydrae%2Fs3-exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlphaHydrae%2Fs3-exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AlphaHydrae","download_url":"https://codeload.github.com/AlphaHydrae/s3-exporter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlphaHydrae%2Fs3-exporter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279000696,"owners_count":26082894,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-08T02:00:06.501Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-09T01:55:38.895Z","updated_at":"2025-10-09T01:55:41.095Z","avatar_url":"https://github.com/AlphaHydrae.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# S3 Exporter\n\nPrometheus exporter for AWS S3 buckets\n\n[![build](https://github.com/AlphaHydrae/s3-exporter/actions/workflows/build.yml/badge.svg)](https://github.com/AlphaHydrae/s3-exporter/actions/workflows/build.yml)\n[![MIT License](https://img.shields.io/static/v1?label=license\u0026message=MIT\u0026color=informational)](https://opensource.org/licenses/MIT)\n\n\u003c!-- START doctoc generated TOC please keep comment here to allow auto update --\u003e\n\u003c!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --\u003e\n\n- [Usage](#usage)\n\n\u003c!-- END doctoc generated TOC please keep comment here to allow auto update --\u003e\n\n## Usage\n\n```bash\ngit clone https://github.com/AlphaHydrae/s3-exporter.git\ncd s3-exporter\ndocker build -t s3-exporter .\n\ndocker run --init -p \"3000:3000\" --rm s3-exporter\n\nexport AWS_ACCESS_KEY_ID=changeme\nexport AWS_SECRET_ACCESS_KEY=changeme\n\ncurl -u \"$AWS_ACCESS_KEY_ID:$AWS_SECRET_ACCESS_KEY\" \\\n  \"http://localhost:3000/metrics?bucket=my-bucket\u0026region=us-east-1\"\n```\n\n## Configuration\n\nAn AWS access key ID and secret access key must be provided using basic\nauthentication.\n\nThe following query parameters are used to configure the produced metrics:\n\n| Parameter | Required | Description                                                     |\n| :-------- | :------- | :-------------------------------------------------------------- |\n| `bucket`  | **yes**  | Name of the AWS S3 bucket to collect metrics for                |\n| `region`  | **yes**  | AWS region where the bucket is located                          |\n| `prefix`  | _no_     | Prefix to collect metrics for (may be specified multiple times) |\n\nThe following options can be used to configure the exporter's server:\n\n| Command line option | Environment variables  | Default value           | Description                                                                   |\n| :------------------ | :--------------------- | :---------------------- | :---------------------------------------------------------------------------- |\n| `--base-url`, `-u`  | `S3_EXPORTER_BASE_URL` | `http://localhost:3000` | The base URL of the exporter (defaults to localhost with the configured port) |\n| `--port`, `-p`      | `S3_EXPORTER_PORT`     | `3000`                  | The port on which the exporter's server listens on                            |\n\n## Metrics\n\nThese are the metrics returned for a bucket:\n\n| Metric                                                | Type    | Unit      | Number of values | Description                                                                         |\n| :---------------------------------------------------- | :------ | :-------- | :--------------- | :---------------------------------------------------------------------------------- |\n| `s3_success`                                          | `gauge` | -         | `1`              | Whether the S3 exporter was able to collect metrics successfully                    |\n| `s3_queries`                                          | `gauge` | -         | `1`              | The number of queries made to S3 to collect metrics                                 |\n| `s3_objects_count`                                    | `gauge` | -         | `p + 1`          | The number of objects for the bucket/prefix combination                             |\n| `s3_object_versions_count`                            | `gauge` | -         | `p + 1`          | The number of object versions for the bucket/prefix combination                     |\n| `s3_objects_size_sum_bytes`                           | `gauge` | `bytes`   | `p + 1`          | The sum of the size of all objects for the bucket/prefix combination                |\n| `s3_object_versions_size_sum_bytes`                   | `gauge` | `bytes`   | `p + 1`          | The sum of the size of all object versions for the bucket/prefix combination        |\n| `s3_largest_object_size_bytes`                        | `gauge` | `bytes`   | `p + 1`          | The size of the largest object for the bucket/prefix combination                    |\n| `s3_largest_object_version_size_bytes`                | `gauge` | `bytes`   | `p + 1`          | The size of the largest object version for the bucket/prefix combination            |\n| `s3_oldest_object_last_modified_date_seconds`         | `gauge` | `seconds` | `p + 1`          | The last modification time of the oldest object, in seconds since the epoch         |\n| `s3_oldest_object_size_bytes`                         | `gauge` | `bytes`   | `p + 1`          | The byte size of the oldest object                                                  |\n| `s3_oldest_object_version_last_modified_date_seconds` | `gauge` | `seconds` | `p + 1`          | The last modification time of the oldest object version, in seconds since the epoch |\n| `s3_oldest_object_version_size_bytes`                 | `gauge` | `bytes`   | `p + 1`          | The byte size of the oldest object version                                          |\n| `s3_newest_object_last_modified_date_seconds`         | `gauge` | `seconds` | `p + 1`          | The last modification time of the newest object, in seconds since the epoch         |\n| `s3_newest_object_size_bytes`                         | `gauge` | `bytes`   | `p + 1`          | The byte size of the newest object                                                  |\n| `s3_newest_object_version_last_modified_date_seconds` | `gauge` | `seconds` | `p + 1`          | The last modification time of the newest object version, in seconds since the epoch |\n| `s3_newest_object_version_size_bytes`                 | `gauge` | `bytes`   | `p + 1`          | The byte size of the newest object version                                          |\n| `s3_duration_seconds`                                 | `gauge` | `seconds` | `1`              | How many seconds it took the S3 exporter to collect metrics                         |\n\n\u003e [!TIP]\n\u003e `p` stands for the number of prefixes specified in the request. For metrics\n\u003e that are prefix-dependent, there will be one value for each prefix plus one\n\u003e value for the entirety of the bucket.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falphahydrae%2Fs3-exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falphahydrae%2Fs3-exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falphahydrae%2Fs3-exporter/lists"}