Link Search Menu Expand Document

Billing - Licensing

Storage Consumption

There is no official and supported way to obtain VCD tenant license usage. A workaround is to query several Veeam Backup Enterprise Manager REST API endpoints to get a list of VMs backed up by tenant jobs and aggregate the numbers in the client code. As of VBR v11 there is no universal endpoint that provides ready-to-use aggregated data.

Workflow

  1. Get a list of tenants

    GET /api/vCloud/orgConfigs.
    When using XML we are interested in the “Name” attribute of the first level element (JSON responses basically reflect the same structure. Using XML is easier as it allows to get specific elements with XPath):

    Tenants

    Warning: it also returns the “default” configuration so you might want to filter out the configuration named “Other organizations”.

  2. Map tenants to jobs.

    The source of the jobs information is GET /api/jobs. Response looks like this:

    Tenants

    In this response we are interested in two attributes: Name and UID.

    Names are needed for mapping jobs to tenants. Veeam Backup and Replication uses the prefix prefixes “TENANTNAME_” for all jobs created by the VCD tenants. This is how we can do the mapping since the respective properties are not exposed in the API.

    Algorithmically you can do the mapping in several ways. In the end we need to get a map of tenants and its jobs. Example:

     {
         "Tenant1": 
         {
             "Tenant1_Backup Job": "urn:veeam:Job:62638c60-74b6-4d6d-8d13-4cd32039f522"
         },
         "Tenant2":
         {
             "Tenant2_VMs Backup": "urn:veeam:Job:da4a15c2-04e7-4135-b876-577249d3d720"
         }
     }
    

    For the next steps, we need either names or UIDs. We will use UIDs as they are generally more reliable.

  3. Once we have the list of jobs belonging to a tenant we can interrogate the endpoint: /api/backupTaskSessions/ applying filter to properties JobUid and CreationTime.

    CreationTime should be set to “NOW minus 30 days” to match Veeam licensing.

    The resulting list of VMs has to be deduplicated in order to get a list of unique VMs backed up during the last month. These numbers then have to be summed up for all tenant jobs to get the total number of consumed VM instances.


Back to top

Copyright © 2019-2022 Solutions Architects, Veeam Software.