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.
It uses APEX for Visualization and generates Daily e-mail report.
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 cost analysis and usage reports features should be used instead.
For application issues, please open ticket at github issues
Developed by Adi Zohar, 2020-2024
- Usage Current State - Report the current state of a tenant using the usage files.
- Usage Over Time - Report usage over time for OCPUs and Storage using the usage files.
- Cost Analysis - Report Cost analysis for a chosen time period using the cost files.
- Cost Over Time - Report Cost over time by house, day, week, month using the cost files.
- Rate Card for Used Product - Report the rate card from the cost files.
- ShowOCI Data (If Enabled) - Report ShowOCI data if ShowOCI enabled and data loaded to ADW.
A 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.
The usage 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. Usage reports generally contain 24 hours of usage data, although occasionally a usage report may contain late-arriving data that is older than 24 hours.
More information can be found at usagereportsoverview.htm
-
IdentityClient.list_compartments - Policy COMPARTMENT_INSPECT
-
IdentityClient.get_tenancy - Policy TENANCY_INSPECT
-
ObjectStorageClient.list_objects - Policy OBJECT_INSPECT
-
ObjectStorageClient.get_object - Policy OBJECT_READ
-
SecretsClient.get_secret_bundle - Policy SECRET_BUNDLE_READ
-
Rest API Used - Accessing List Pricing
- OCI_USAGE - Raw data of the usage reports
- OCI_USAGE_STATS - Summary Stats of the Usage Report for quick query if only filtered by tenant and date
- OCI_USAGE_TAG_KEYS - Tag keys of the usage reports
- OCI_COST - Raw data of the cost reports
- OCI_COST_STATS - Summary Stats of the Cost Report for quick query if only filtered by tenant and date
- OCI_COST_TAG_KEYS - Tag keys of the cost reports
- OCI_COST_REFERENCE - Reference table of the cost filter keys - SERVICE, REGION, COMPARTMENT, PRODUCT, SUBSCRIPTION
- OCI_PRICE_LIST - Has the price list and the cost per product
- OCI_LOAD_STATUS - Has the load file statistics
- OCI_TENANT - Has the display name of the child tenants (Manual Update)
- OCI_INTERNAL_COST - Used for internal rate cards
- Python 3.9.19
- oracledb 2.4.0
- requests 2.32.1
- OCI Python SDK 2.134.0
Usage2ADW utility is an open source project. Oracle gratefully acknowledges the contributions to Usage2ADW utility that have been made by the community. Before submitting a pull request, please review our contribution guide
Please consult the security guide for our responsible security vulnerability disclosure process
Copyright (c) 2024, Oracle and/or its affiliates. Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/
See LICENSE for details.