VMware Cloud Community
vidyavadke
Contributor
Contributor

How to generate report using APIs for newly added resource pool

Hi,

I am trying to figure out the APIs to be called for following situation -

I have Vcenter server added to Chargeback.

After that, I add an organization in lag manager and have a resource pool in it.

Now, i want to tell chanrgeback to generate/schedule reports for this newly added organization's resource pool.

Will i need to run data collector in this situation? Is there any way to run data collector programatically?

Also, where can i find XSDs for the request and response xmls? API reference has sample xmls but no XSDs.

Regards,

-Vidya

Tags (1)
Reply
0 Kudos
1 Reply
abhinavkatiyar
Enthusiast
Enthusiast

Hi Vidya,

There should always be atleast 1 data collector running with vCenter Chargeback installation. Please choose to install data collector while installing vCenter Chargeback or install data collector separately by downloading from "Download Data Collector" link in Settings->Data Collectors tab in CBM UI. You can also see running data collectors on this tab.

You cannot run data collector programmatically. Installing & Enabling data collector is a configuration step.

XSDs are there only to define resources in vCenter Chargeback and not

individual APIs. However, api reference doc describes required xml

elements/attributes while you are working on any resource.

After adding vCenter Server to Chargeback, you should create a chargeback hierarchy with entities from added vCenter Server. If you add top level vCenter Server entity to the chargeback hierarchy, all the entities under it will automatically be synced to chargeback hierarchy.

In your case, if organization entity from vCenter Server is already added to the chargeback hierarchy, any resource pools (old and new) under that will be part of chargeback hierarchy.

Once chargeback hierarchy is created, you can start generating reports for any entity in the hierarchy by using any available cost model (default cost model with id 1 is shipped with product; you can create additional cost models by using "Add Cost Model" api).

Please let me know if you need any other details.

Thanks,

Abhinav

Reply
0 Kudos