17 unstable releases (6 breaking)
| 0.7.0 | Dec 10, 2025 |
|---|---|
| 0.6.0 | Nov 13, 2025 |
| 0.5.4 | Sep 3, 2025 |
| 0.5.3 | Feb 16, 2024 |
| 0.2.0 | Mar 28, 2023 |
#1671 in Parser implementations
180KB
4.5K
SLoC
osc-cost
🌐 Links
- 📘 Outscale API: docs.outscale.com/api
- 📦 Helm chart: osc-cost
- 🐳 Docker Compose: docker-compose.yaml
- 🤝 Contribution Guide: CONTRIBUTING.md
- 🔧 Prometheus Exporter: prometheus_exporter
- 💬 Join us on Discord
📄 Table of Contents
- Overview
- Project Status
- Requirements
- Installation
- Configuration
- Usage
- Prometheus Exporter
- Drift Analysis (Beta)
- Deployment
- Contributing
- Release Process
- License
🧭 Overview
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).
🚧 Project Status
⚠️ 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.
✅ Requirements
- An OUTSCALE account with access to the API
~/.osc/config.jsonfor credentials- Linux/macOS shell (tested with Bash)
- Prometheus (optional, for metric export)
🔨 Installation
Download the latest binary from the GitHub Releases page.
Make it executable:
chmod +x osc-cost
mv osc-cost /usr/local/bin/
🛠 Configuration
The tool expects credentials in ~/.osc/config.json.
Example config:
{
"default": {
"access_key": "YOUR_ACCESS_KEY",
"secret_key": "YOUR_SECRET_KEY",
"region": "eu-west-2"
}
}
To use a different profile, use the --profile flag.
🚀 Usage
Estimate costs (default format: human-readable)
osc-cost
Output options
osc-cost --format=human # human-friendly output
osc-cost --format=markdown # markdown 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
Skip expensive resources
osc-cost --skip-resource Oos
📊 Drift Analysis (Beta)
Compare cost estimations with actual usage from digest:
Step 1 – Export estimation
osc-cost --format=json --output account.json
Step 2 – Freeze the account for a day
Step 3 – Compare costs the next day
osc-cost --compute-drift \
--from-date "$(date -d '-1 day' +%Y-%m-%d)" \
--to-date "$(date +%Y-%m-%d)" \
--input account.json
Example output
╭───────────────┬──────────┬────────┬───────╮
│ Resource Type ┆ Osc-cost ┆ Digest ┆ Drift │
╞═══════════════╪══════════╪════════╪═══════╡
│ Volume ┆ 1.18 ┆ 1.18 ┆ 0% │
│ Snapshot ┆ 1.25 ┆ 0.62 ┆ 101% │
╰───────────────┴──────────┴────────┴───────╯
📈 Prometheus Exporter
Export estimated prices in Prometheus format:
osc-cost-exporter --bind 127.0.0.1:8080 &
curl http://127.0.0.1:8080
🚢 Deployment
With Helm
Use the osc-cost Helm chart for Kubernetes deployment.
With Docker Compose
docker-compose -f helm/docker-compose.yaml up
On Kubernetes (Kind or RKE)
You can deploy with any Kubernetes setup.
🤝 Contributing
We welcome your contributions!
Please read the CONTRIBUTING.md guide.
🚀 Release Process
- Update
Chart.yamlandvalues.yamlinhelm/osccost/ - Tag a release:
git tag -a vX.X.X -m "vX.X.X"
- Push the tag and publish the release on GitHub.
📜 License
osc-cost is licensed under the BSD 3-Clause License. © Outscale SAS This project is compliant with the REUSE Specification
Dependencies
~92MB
~1.5M SLoC