Installation
Running the Server
STDIO Transport Mode
HTTP Streaming Transport Mode
Available Tools
The server provides the following tools for usage tracking:| Tool Name | Description |
|---|---|
list_usage_reports | List usage reports in the tenancy |
get_usage_report | Get usage report by ID |
Usage Examples
List Usage Reports
Get Specific Report
Understanding OCI Usage
What is Usage Reporting?
OCI Usage service provides detailed consumption data for:- Resource Usage - Track usage of compute, storage, network, and other services
- Cost Analysis - Understand spending patterns
- Trend Analysis - Monitor usage over time
- Chargeback - Allocate costs to teams or projects
- Budget Planning - Forecast future usage and costs
Usage Data Granularity
Usage reports provide:- Hourly usage data
- Daily summaries
- Monthly aggregations
- Service-level breakdowns
- Compartment-level attribution
- Tag-based grouping
Usage Metrics
Common usage metrics include: Compute- Instance hours by shape
- OCPU hours
- Memory GB hours
- Boot volume storage
- Block volume GB months
- Object storage GB hours
- File storage GB hours
- Backup storage
- Data transfer GB
- Load balancer hours
- VPN connection hours
- FastConnect bandwidth
- Database OCPU hours
- Storage GB months
- Backup storage
- Data Guard configuration hours
Authentication
The server uses OCI CLI configuration from~/.oci/config:
Required Permissions
Your OCI user or instance principal needs these IAM permissions: Read Usage Reports:Common Use Cases
Cost Management
- Track monthly spending
- Identify cost trends
- Compare usage across periods
- Forecast future costs
- Set budget alerts
Showback & Chargeback
- Allocate costs by compartment
- Tag-based cost allocation
- Generate departmental reports
- Track project costs
- Invoice internal customers
Usage Optimization
- Identify unused resources
- Find optimization opportunities
- Track usage efficiency
- Right-size resources
- Reduce waste
Capacity Planning
- Analyze growth trends
- Forecast resource needs
- Plan for scaling
- Budget for expansion
- Avoid capacity shortages
Compliance & Auditing
- Track resource consumption
- Verify usage policies
- Generate compliance reports
- Audit spending patterns
- Document resource usage
Best Practices
Tagging for Cost Allocation
- Tag all resources at creation
- Use consistent tag namespaces
- Define cost center tags
- Tag by project, environment, owner
- Automate tagging policies
Regular Monitoring
- Review usage reports weekly/monthly
- Set up automated reporting
- Track usage anomalies
- Monitor cost trends
- Investigate unexpected spikes
Budget Management
- Set realistic budgets
- Configure budget alerts
- Track budget vs. actual
- Adjust budgets based on trends
- Plan for seasonal variations
Cost Optimization
- Identify idle resources
- Right-size over-provisioned resources
- Use cheaper storage tiers
- Delete unused resources
- Leverage reserved capacity
Related Services
- Pricing - Query OCI pricing information
- Identity - Compartment organization for cost tracking
- Resource Search - Find resources by tags
- Monitoring - Monitor resource utilization
