VMware Cloud Community
nicossl
Contributor
Contributor

vCloud Director telemetry - amqp/API and result

Hello,

I searched a long time on Internet/ in VMware documentation but unfortunately without result. That's why I hope to find support on this forum.

I linked a vCloud Director cell on a RabbitMQ solution in order to receive notifications when an action is done in the vCloud Director environment.

Everything is running well and I receive a message in the queue when a user makes a change on a VM configuration.

notification output

<?xml version="1.0" encoding="UTF-8"?>

<vmext:Notification xmlns:vmext="http://www.vmware.com/vcloud/extension/v1.5" eventId="5069d050-1dc6-43fd-befc-b58caf65a5bd" type="com/vmware/vcloud/event/vm/modify" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.vmware.com/vcloud/extension/v1.5 https://xxx/api/v1.5/schema/vmwextensions.xsd">

  <vmext:Link rel="entityResolver" href="xxx/"/>

  <vmext:EntityLink rel="entity" id="urn:vcloud:vm:9eb4363e-ea2b-4c07-bb01-c3df709d5def" name="vm-01" type="vcloud:vm"/>

  <vmext:EntityLink rel="down" id="urn:vcloud:user:2319e7d1-33c5-4e8b-a649-c280b5dc61ef" name="system" type="vcloud:user"/>

  <vmext:EntityLink rel="up" id="urn:vcloud:org:74be49e7-056f-46d8-af0f-2b4cac7a2871" name="xxx" type="vcloud:org"/>

  <vmext:Timestamp>2019-10-09T20:44:46.835Z</vmext:Timestamp>

  <vmext:OperationSuccess>true</vmext:OperationSuccess>

</vmext:Notification>

Now, I would like to know what is exactly the change (add memory, remove cpu or something else).

Via the API, I can retrieve the VM object and its complete configuration (example below)

postman-01.jpg

But how to discover exactly the change(s) applied by the user?

My idea is to compare the VM object state before and after the user change.

example:

vm state before the change > 2x CPU, 4x GB of memory

vm state after the change > 2x VCPU, 2x GB of memory

Result: 2x GB of memory less

Comparison process could be difficult following the number of parameters composing a VM object.

How do you proceed from your side or what are your recommendations to know quickly the user change?

Thanks for your support and don't hesitate to ask your question to clarify my question.

Thanks a lot for your support.

Nicolas

0 Kudos
1 Reply
Raducanu
Enthusiast
Enthusiast

Welcome to the lack of vCD -> Billing and Telemetry.

I would suggest to save the current values you like to bill your custimer inside a seperate database.

on a config change you have to write a new value. Also i would suggest to do a daily "query" run just to fetch the case that you missed a change

0 Kudos