ccc - Cloud Cost Checker collects, calculates, graphs and notifies IaaS costs.
- Inform you of IaaS costs so that you are aware of sudden cost increases
- Don't bother opening the console to see costs
- Google Cloud Platform
- Post to Slack
- Save to local directory
- Please create a Bot and issue access tokens by referring to this document.
- Don't forget to invite Slack Bot User to your channel!
Download ccc for your execution environment as follows:
VERSION=v0.0.6
# download
curl -fLROSs https://github.com/kunitsucom/ccc/releases/download/${VERSION}/ccc_${VERSION}_darwin_arm64.zip
# unzip
unzip -j ccc_${VERSION}_darwin_arm64.zip '*/ccc'
# Authenticate with Google User or Service Account that has permissions
# equivalent to `roles/bigquery.dataViewer` and `roles/bigquery.user` in some way.
export GOOGLE_APPLICATION_CREDENTIALS=/path/to/key.json
# Run ccc
./ccc \
-tz Asia/Tokyo \
-project your-gcp-project \
-billing-table your-gcp-project.billing_dataset.gcp_billing_export_v1_FFFFFF_FFFFFF_FFFFFF \
-billing-project your-gcp-project \
-message '```your-gcp-project Cost last 30 days (last 30 days)```' \
-slack-token xoxb-999999999999-9999999999999-ZZZZZZZZZZZZZZZZZZZZZZZZ \
-slack-channel '#your-bot-invited-channel' \
-days 30 \
-debug
It will be posted as follows:
I highly recommend this GitHub Actions: ccc-actions - GitHub Actions for Cloud Cost Checker
- IaaS
- Google Cloud Platform
- Amazon Web Service
- Method of saving Cost Graph Image
- Post to Slack
- Save to local directory
- Add tests