Flexera has released in early April a license Consumption (& Charge Back) REST API that us documented here.
The API makes available data for Business Intelligence / data extraction tools that provides a flat view of what / who consumed what licenses, for which entity, for what reason etc.
The response (JSON format) provides for all installed devices or users consuming a license extensive information:
Cost Per Right for license
Consumption of the machine
Consumption of the host
Computer / user Location-Cost Center - Corporate Unit
Installed & consuming Cores for host, cluster
The REST API is called in the context of a license and is paginated, but the attached PowerShell example shows how to loop on licenses and stack the pages. Given the volumes of license consumption, filtering the target licenses may be useful.
Each license type has its own charge back logic... In the example below, Oracle Cluster consumptions are pro rated down to the installed VMs... for Oracle hard partitioning or IBM PVU (current) consumption, the "split" logic between hosts and VMs is pretty sophisticated and factors each capping layer (capped cores on LPAR, Capped core for pool, Host cores etc.)
Here is an extract of the attached PowerShell script that will allow to query all licenses consumption.