showoci - Oracle Cloud Infrastructure Reporting Tool
SHOWOCI is a reporting tool which uses the Python SDK to extract list of resources from your tenant. It covers most of OCI components, Authentication by User or Compute using instance principals, Output can be printer friendly, CSV files or JSON file with an option to load the CSV files to Autonomous DB.
Complete OCI Tenant Inventory Reporting
Extract and analyze your Oracle Cloud Infrastructure resources with comprehensive Python-based reporting.
⚠️ Important Disclaimer
This is not an official Oracle application and is not supported by Oracle Support. It should NOT be used for utilization calculation purposes. Instead, use OCI's official cost analysis and usage reports features.
Developed by Adi Zohar, 2018-2025. Contributors: Olaf Heimburger
What is SHOWOCI?
SHOWOCI is a Python-based reporting tool that uses the OCI SDK to extract comprehensive lists of resources from your Oracle Cloud Infrastructure tenant.
Comprehensive Coverage
Covers 50+ OCI service modules from compute to databases
Multiple Outputs
Printer-friendly, CSV, JSON, or Autonomous DB
Flexible Auth
User authentication or instance principals
Requirements
- •Cloud Shell, Virtual Machine, or local PC
- •Internet connectivity to access OCI REST APIs
- •Python 3.9+
- •OCI SDK Python packages
Quick Start with Cloud Shell
Cloud Shell has a 20-minute timeout. For large extracts, use a dedicated Virtual Machine.
Step 1: Clone and Link
git clone https://github.com/oracle/oci-python-sdk
ln -s oci-python-sdk/examples/showoci .Or install using bash:
bash -c "$(curl -L https://raw.githubusercontent.com/oracle/oci-python-sdk/master/examples/showoci/showoci_upgrade.sh)"Step 2: Change Directory
cd showociCommon Usage Examples
All Resources (Except Identity)
python3 showoci.py -dt -aniCompute Resources with CSV Output
python3 showoci.py -dt -c -csv $HOME/outputCompute & Database with CSV
python3 showoci.py -dt -c -d -csv $HOME/outputFilter by Compartment and Region
python3 showoci.py -ip -c -cp AdiZohar -rg us-ashburn-1PaaS Services with JSON Output
python3 showoci.py -paas -jsSetup Policies
For Instance Principals
Create Dynamic Group ShowOCIDynamicGroup:
any {ALL {instance.id = 'ocid1.instance.oc1.xxxxxxxxxx'}}Add Policy:
allow dynamic-group ShowOCIDynamicGroup to read all-resources in tenancyFor User Authentication
Required: OCI IAM user with read-only privileges (Inspect can be used with reduced info)
ALLOW GROUP ReadOnlyUsers to read all-resources IN TENANCYUse oci setup config to configure the user on VM
Covered OCI Services (50+ Modules)
- • Virtual Networks
- • Compute Instances
- • Load Balancers
- • Network Firewalls
- • Block Storage
- • File Storage
- • Object Storage
- • Database Services
- • Autonomous DB
- • NoSQL
- • PostgreSQL
- • Container Engine
- • Functions
- • API Gateways
- • Analytics
- • Data Science
- • Data Flow
- • Data Catalog
- • Cloud Guard
- • Key Management
- • Bastion
- • Data Safe
- • Integration Cloud
- • Golden Gate
- • Events
- • Streaming
- • Monitoring
- • Logging
- • Health Checks
- • Notifications
- • DNS
- • Budgets
- • Limits
Key Execution Flags
| Flag | Description |
|---|---|
| -dt | Use delegation token (Cloud Shell) |
| -ip | Use instance principals authentication |
| -c | Extract Compute resources |
| -d | Extract Database resources |
| -paas | Extract all PaaS services |
| -csv | Generate CSV output files |
| -js | Generate JSON output |
| -rg | Filter by region |
| -cp | Filter by compartment |
| -ani | Exclude identity services |
Installation on OCI VM
- Deploy VM Compute instance (Oracle Linux 8 recommended)
- Create Dynamic Group with instance OCID
- Create policy allowing read access
- SSH to instance and install OCI CLI
- Install Python 3.9+ and OCI SDK
- Clone showoci repository
- Run the tool with desired flags
Upgrading SHOWOCI
cd $HOME/showoci
git pull
pip3 install --upgrade oci oci-cli💡 Pro Tips
- •Use
-dtflag for Cloud Shell sessions - •For large tenants, run on a dedicated VM to avoid timeouts
- •Combine multiple flags to extract specific resource types
- •Use CSV output for easy import into spreadsheets or databases
- •Schedule periodic runs with cron for ongoing inventory tracking
Use Cases
Inventory Management
Track all OCI resources across compartments and regions
Resource Auditing
Generate compliance reports for security reviews
Cost Analysis
Identify resource usage patterns and optimization opportunities
Capacity Planning
Understand resource distribution for future planning
📚 Official Resources
- GitHub Repository: oracle/oci-python-sdk/examples/showoci
- OCI Python SDK: Documentation