{"id":19584714,"url":"https://github.com/oracle-samples/usage-reports-to-adw","last_synced_at":"2025-07-23T19:04:10.856Z","repository":{"id":182029442,"uuid":"666087467","full_name":"oracle-samples/usage-reports-to-adw","owner":"oracle-samples","description":"Usage2adw is a tool which uses the Python SDK to extract the usage and cost reports from your tenant and load it to Oracle Autonomous Database. (DbaaS can be used as well) Authentication to OCI by User or instance principals. ","archived":false,"fork":false,"pushed_at":"2025-07-15T14:15:45.000Z","size":5963,"stargazers_count":18,"open_issues_count":0,"forks_count":12,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-07-16T07:22:09.340Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oracle-samples.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.rst","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-07-13T17:20:10.000Z","updated_at":"2025-07-15T14:15:46.000Z","dependencies_parsed_at":"2024-04-30T15:26:53.100Z","dependency_job_id":"f4b5f3ef-da13-4e37-8f1c-6f92d99e9b14","html_url":"https://github.com/oracle-samples/usage-reports-to-adw","commit_stats":null,"previous_names":["oracle-samples/usage-reports-to-adw"],"tags_count":0,"template":false,"template_full_name":"oracle/template-repo","purl":"pkg:github/oracle-samples/usage-reports-to-adw","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oracle-samples%2Fusage-reports-to-adw","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oracle-samples%2Fusage-reports-to-adw/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oracle-samples%2Fusage-reports-to-adw/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oracle-samples%2Fusage-reports-to-adw/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oracle-samples","download_url":"https://codeload.github.com/oracle-samples/usage-reports-to-adw/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oracle-samples%2Fusage-reports-to-adw/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266737568,"owners_count":23976389,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-11T07:49:26.673Z","updated_at":"2025-07-23T19:04:10.829Z","avatar_url":"https://github.com/oracle-samples.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Usage2ADW - Oracle Cloud Infrastructure Usage and Cost Reports to Autonomous Database Tool\n\n## Getting Started\n\nUsage2adw is a tool which uses the Python SDK to extract the cost reports from your tenant and load it to Oracle Autonomous Database. (DbaaS can be used as well)\nAuthentication to OCI by User or instance principals.\n\nIt uses APEX for Visualization and generates Daily e-mail report.\n\n**DISCLAIMER - This is not an official Oracle application,  It does not supported by Oracle Support, It should NOT be used for utilization calculation purposes, and rather OCI's official\n[cost analysis](https://docs.oracle.com/en-us/iaas/Content/Billing/Concepts/costanalysisoverview.htm) \nand [usage reports](https://docs.oracle.com/en-us/iaas/Content/Billing/Concepts/usagereportsoverview.htm) features should be used instead.**\n\nFor application issues, please open ticket at [github issues](https://github.com/oracle-samples/usage-reports-to-adw/issues) \n\n\n**Developed by Adi Zohar, 2020-2025**\n\n## Documentation\n\n- Current State - Report the current state of a tenant.\n- CPU and Storage Over Time - Report usage over time for OCPUs and Storage.\n- Cost Analysis - Report Cost analysis for a chosen time period.\n- Cost Over Time - Report Cost over time by house, day, week, month.\n- Rate Card for Used Product - Report the rate card from the cost files.\n- ShowOCI Data (If Enabled) - Report ShowOCI data if ShowOCI enabled and data loaded to ADW.\n\n## Cost Reports\n\n![](img/screen_4.png)\n![](img/screen_5.png)\n![](img/screen_6.png)\n![](img/screen_7.png)\n\n## Rate Card\n\n![](img/screen_8.png)\n\n## Cost Reports\n\n![](img/screen_1.png)\n![](img/screen_2.png)\n![](img/screen_3.png)\n\n## Daily E-Mail Report\n\n![](img/report_05.png)\n\n## Cost Reports Overview\n\nA usage report is a comma-separated value (CSV) file that can be used to get a detailed breakdown of resources in Oracle Cloud Infrastructure for audit or invoice reconciliation.\n\n## How Cost Reports Work\n\nThe cost report is automatically generated daily, and is stored in an Oracle-owned Object Storage bucket. It contains one row per each Oracle Cloud Infrastructure resource (such as instance, Object Storage bucket, VNIC) per hour along with consumption information, metadata, and tags. Cost reports generally contain 24 hours of usage and cost data, although occasionally a cost report may contain late-arriving data that is older than 24 hours.\n\nMore information can be found at [usagereportsoverview.htm](https://docs.cloud.oracle.com/en-us/iaas/Content/Billing/Concepts/usagereportsoverview.htm)\n\n## Installation\n\n1. [Step by Step using Resource Management (Terraform)](step_by_step_terraform.md)\n\n2. [Step by Step Installation](step_by_step_installation.md)\n\n3. [Step by Step Manual Installation](step_by_step_manual_installation.md)\n\n4. [Step by Step How to File](step_by_step_howto.md)\n\n## OCI SDK Modules and API used\n\n- IdentityClient.list_compartments - Policy COMPARTMENT_INSPECT\n- IdentityClient.get_tenancy       - Policy TENANCY_INSPECT\n- ObjectStorageClient.list_objects - Policy OBJECT_INSPECT\n- ObjectStorageClient.get_object   - Policy OBJECT_READ\n- SecretsClient.get_secret_bundle  - Policy SECRET_BUNDLE_READ\n\n- Rest API Used - [Accessing List Pricing](https://docs.oracle.com/en-us/iaas/Content/GSG/Tasks/signingup_topic-Estimating_Costs.htm#accessing_list_pricing)\n\n## Database Tables\n\n- OCI_COST - Raw data of the cost reports\n- OCI_COST_STATS - Summary Stats of the Cost Report for quick query if only filtered by tenant and date\n- OCI_COST_TAG_KEYS - Tag keys of the cost reports\n- OCI_COST_REFERENCE - Reference table of the cost filter keys - SERVICE, REGION, COMPARTMENT, PRODUCT, SUBSCRIPTION\n- OCI_PRICE_LIST - Has the price list and the cost per product\n- OCI_LOAD_STATUS - Has the load file statistics\n- OCI_TENANT - Has the display name of the child tenants (Manual Update)\n\n## 3rd Party Dependencies including tested versions\n\n- Python 3.9.19\n- oracledb 3.0.0\n- requests 2.32.1\n- OCI Python SDK 2.144.1\n\n## Contributing\n\nUsage2ADW utility is an open source project.\nOracle gratefully acknowledges the contributions to Usage2ADW utility that have been made by the community.\nBefore submitting a pull request, please [review our contribution guide](./CONTRIBUTING.md)\n\n## Security\n\nPlease consult the [security guide](./SECURITY.md) for our responsible security vulnerability disclosure process\n\n## My Other Projects\n\n- [ShowOCI](https://github.com/oracle/oci-python-sdk/tree/master/examples/showoci)\n\n- [ShowUsage](https://github.com/oracle/oci-python-sdk/tree/master/examples/showusage)\n\n- [ShowSubscription](https://github.com/oracle/oci-python-sdk/tree/master/examples/showsubscription)\n\n- [ShowRewards](https://github.com/oracle/oci-python-sdk/tree/master/examples/showrewards)\n\n- [List Resources in Tenancy](https://github.com/oracle/oci-python-sdk/tree/master/examples/list_resources_in_tenancy)\n\n- [Object Storage Tools](https://github.com/oracle/oci-python-sdk/tree/master/examples/object_storage)\n\n- [Tag Resources in Tenancy](https://github.com/oracle/oci-python-sdk/tree/master/examples/tag_resources_in_tenancy)\n\n## License\n\nCopyright (c) 2025, Oracle and/or its affiliates. \nLicensed under the Universal Permissive License v 1.0 as shown at  https://oss.oracle.com/licenses/upl/ \n\nSee [LICENSE](./LICENSE.txt) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foracle-samples%2Fusage-reports-to-adw","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foracle-samples%2Fusage-reports-to-adw","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foracle-samples%2Fusage-reports-to-adw/lists"}