Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/luzilla/acronis-s3-usage
Some code to pull S3 storage usage by tenant (ACI) and user (ACI/VHI).
https://github.com/luzilla/acronis-s3-usage
acronis acronis-cyber-cloud acronis-cyber-infrastructure acronis-cyber-platform ostor s3 vhi virtuozzo
Last synced: about 2 months ago
JSON representation
Some code to pull S3 storage usage by tenant (ACI) and user (ACI/VHI).
- Host: GitHub
- URL: https://github.com/luzilla/acronis-s3-usage
- Owner: Luzilla
- License: bsd-2-clause
- Created: 2022-01-27T15:54:26.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-11-04T23:36:11.000Z (about 2 months ago)
- Last Synced: 2024-11-05T00:33:01.368Z (about 2 months ago)
- Topics: acronis, acronis-cyber-cloud, acronis-cyber-infrastructure, acronis-cyber-platform, ostor, s3, vhi, virtuozzo
- Language: Go
- Homepage: https://godocs.io/github.com/Luzilla/acronis-s3-usage
- Size: 121 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# acronis-s3-usage
This project started as a playground to explore certain APIs provided by ACI (or VHI) to extract usage for the object storage provided. It now hosts a libraries to interact with ACI (specifically) and Ostor APIs (for Acronis and Virtuozzo Object Storage).
## library
See the [`pkg`](./pkg/) directory for the Golang libraries (or SDKs, if you will) for `acronis` (ACI) and the the Acronis/Virtuozzo Ostor API.
## toys
This repository includes ready code that allows you to run code examples against your Acronis or Virtuozzo setups.
Each tool will take arguments for the user/password of required tokens/credentials, but also supports environment variables (see [`.envrc-dist`](./.envrc-dist))
The command line tools (along with the source code), are also available as [release downloads](https://github.com/Luzilla/acronis-s3-usage/releases).
### pull overall usage (ACI)
A command line tool to pull S3 storage usage by tenant from Acronis Cyber Infrastructure (ACI).
```sh
$ go run ./cmd/tenant-usage/main.go
Got a token: ABC***
Got tenant id: abc-abc-abc-abc-abcCyber Infrastructure (Type: hci)
hci_s3_storage -- 11070.81 GBCyber Infrastructure (Type: hci)
hci_s3_storage -- 4619.61 GB
```### extract usage for buckets (ACI & VHI)
A command line tool to interact with the Ostor APIs — it allows user management, bucket management and extracting statistics (e.g. number of GET, HEAD, POST and PUT requests and storage used).
```sh
❯ go run ./cmd/ostor/main.go --help
NAME:
a program to interact with the s3 management APIs in ACI and VHI - A new cli applicationUSAGE:
a program to interact with the s3 management APIs in ACI and VHI [global options] command [command options]VERSION:
dev (none, date: unknown)COMMANDS:
buckets, b list buckets
stats, s list stats
users, u list users
help, h Shows a list of commands or help for one commandGLOBAL OPTIONS:
--s3-endpoint value [$S3_ENDPOINT]
--s3-system-key-id value [$S3_SYSTEM_KEY_ID]
--s3-system-secret value [$S3_SYSTEM_SECRET_KEY]
--help, -h show help
--version, -v print the version
```## adopters
- [Planetary Quantum GmbH](https://www.planetary-quantum.com/)
## contributions
If you end up using this, feel free to let me know by adding yourself to the adopers. All contributions (documentation, bug fixes, feature suggestions) are welcome.