Oracle Cloud Infrastructure generates detailed cost and usage reports that are delivered as CSV files to an Object Storage bucket. These reports are the foundation of any cost analysis, but their structure can be confusing at first glance.
Report Structure
OCI cost reports come in two flavors:
Cost Reports: Contain billing-level data including costs, credits, and discounts
Usage Reports: Contain resource-level consumption data
Each report file covers a 24-hour period and contains dozens of columns. Here are the most important ones:
Key Fields
lineItem/referenceNo — A unique identifier for each line item. Useful for deduplication when processing reports.
lineItem/tenantId — The OCID of the tenancy. Important for multi-tenancy environments.
lineItem/intervalUsageStart / intervalUsageEnd — The time window for this usage record. Typically hourly granularity.
product/service — The OCI service name (e.g., "COMPUTE", "OBJECTSTORAGE", "DATABASE"). This is your primary dimension for service-level cost analysis.
product/resource — The specific resource type (e.g., "PIC_COMPUTE_STANDARD_E4_FLEX"). This gets granular and is essential for right-sizing analysis.
product/compartmentName — The compartment where the resource lives. OCI's compartment hierarchy is your best tool for cost allocation.
product/region — The OCI region (e.g., "us-ashburn-1"). Useful for identifying unexpected cross-region usage.
cost/subscriptionId — Links to the subscription or commitment. Important for tracking Universal Credit consumption.
cost/unitPrice — The per-unit price applied to this usage.
usage/billedQuantity — The amount of usage that was actually billed.
cost/myCost — The final cost after all discounts and credits. This is the number that appears on your invoice.
Common Gotchas
1. Credits and Discounts
The raw cost/unitPrice * usage/billedQuantity doesn't always equal cost/myCost. OCI applies various credits, promotions, and commitment-based discounts. Always use cost/myCost for actual cost analysis.
2. Time Zone Confusion
Report timestamps are in UTC. When comparing with your internal reporting (which might use a different timezone), this can lead to discrepancies, especially at month boundaries.
3. Delayed Data
Cost reports can be delayed by up to 4 hours. Don't rely on them for real-time monitoring — but for daily and monthly analysis, they're comprehensive.
4. Report File Naming
Files follow a naming convention that includes the date range. When building automated ingestion (like OCIFinOps does), parsing these filenames correctly is critical for avoiding gaps or duplications.
Automating the Process
Manually downloading and analyzing CSV files doesn't scale. OCIFinOps automates the entire pipeline: pulling reports from Object Storage, converting them to columnar Parquet format for efficient querying, loading them into DuckDB, and exposing the data through interactive dashboards and AI-powered natural language queries.
The result: instead of wrangling spreadsheets, you can simply ask "What was my compute spend last month?" and get an instant answer.