Sends total size of objects (bytes) and number of objects to Mackerel
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
README.markdown
main.go

README.markdown

mackerel-aws-s3-stats

Usage

MACKEREL_APIKEY='...' mackerel-aws-s3-stats --region $REGION --bucket $BUCKET_NAME --service [--bucket $ANOTHER_BUCKET_NAME]

Sends total size of objects (bytes) and number of objects to Mackerel.

or only calculating stats, do not request to Mackerel.

mackerel-aws-s3-stats --region $REGION --bucket $BUCKET_NAME --no-post [--bucket $ANOTHER_BUCKET_NAME]

See also how to specify the AWS credentials: https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html

Build

go build ./...
GOOS=linux GOARCH=amd64 go build -o mackerel-aws-s3-stats.linux.amd64 ./...