| Crates.io | osc-cost |
| lib.rs | osc-cost |
| version | 0.5.4 |
| created_at | 2023-02-09 09:20:31.436836+00 |
| updated_at | 2025-09-03 08:02:53.755237+00 |
| description | osc-cost helps measuring OUTSCALE infrastructure costs |
| homepage | |
| repository | https://github.com/outscale/osc-cost |
| max_upload_size | |
| id | 780610 |
| size | 325,567 |
osc-cost is a command-line utility that estimates current cloud costs for an Outscale account by analyzing live resource states.
It supports multiple output formats and can also export metrics to Prometheus or compare estimated costs against digest-based billing (experimental).
⚠️ This project is in sandbox status and under active development. Cost estimations are approximations and may differ from official billing. Only official invoices from OUTSCALE are authoritative.
~/.osc/config.json for credentialsDownload the latest binary from the GitHub Releases page.
Make it executable:
chmod +x osc-cost
mv osc-cost /usr/local/bin/
The tool expects credentials in ~/.osc/config.json.
{
"default": {
"access_key": "YOUR_ACCESS_KEY",
"secret_key": "YOUR_SECRET_KEY",
"region": "eu-west-2"
}
}
To use a different profile, use the --profile flag.
osc-cost
osc-cost --format=human # human-friendly output
osc-cost --format=json # detailed structured output
osc-cost --format=ods # ODS spreadsheet
osc-cost --format=prometheus # Prometheus format
osc-cost --format=hour # Only price per hour
osc-cost --format=month # Only price per month
osc-cost --skip-resource Oos
Compare cost estimations with actual usage from digest:
osc-cost --format=json --output account.json
osc-cost --compute-drift \
--from-date "$(date -d '-1 day' +%Y-%m-%d)" \
--to-date "$(date +%Y-%m-%d)" \
--input account.json
╭───────────────┬──────────┬────────┬───────╮
│ Resource Type ┆ Osc-cost ┆ Digest ┆ Drift │
╞═══════════════╪══════════╪════════╪═══════╡
│ Volume ┆ 1.18 ┆ 1.18 ┆ 0% │
│ Snapshot ┆ 1.25 ┆ 0.62 ┆ 101% │
╰───────────────┴──────────┴────────┴───────╯
Export estimated prices in Prometheus format:
osc-cost --format=prometheus -n
A serde formatter is used to expose metrics in a simple text format.
Use the osc-cost Helm chart for Kubernetes deployment.
docker-compose -f helm/docker-compose.yaml up
You can deploy with any Kubernetes setup.
We welcome your contributions!
Please read the CONTRIBUTING.md guide.
Chart.yaml and values.yaml in helm/osccost/git tag -a vX.X.X -m "vX.X.X"
osc-cost is licensed under the BSD 3-Clause License. © Outscale SAS This project is compliant with the REUSE Specification