- This topic has 4 replies, 2 voices, and was last updated April 13, 2017 by Peter C.
Obtaining timelines of entering/leaving protection
-
Peter CApril 11, 2017 08:16:46 AM
Second time lucky after the forum message popup disappeared with my about-to-be-sent post ๐
I have taken over an embryonic Java project whose purpose is to obtain information about when VMs enter and leave protection. We need a timeline of VM activities from a protection point of view. I am already well-versed in obtaining event information from the rabbitmq on vCloud Director about what is happening on the estate. I believe Zerto also subscribes to vCloud messages?
There are two ways of obtaining the Zerto information from what I can see:
o periodically polling a RESTful events endpoint
o periodically polling a RESTful resource reports endpoint (dependent on reporting being configured)The events information doesn’t appear too helpful. We need the VM Id and vOrg Id. The Vm Id is present in the Description field of an event for entering protection but there is no vOrg Id. For example:
“Description”: “Update protection group. Success. Completed successfully: VM(s) Prod_DM1_Mig2 (a6f5985a-b39a-4f77-a1e3-aac9c37626f9) added to protection group.”
However, there is no VM iD or vOrg Id in the event for leaving protection. Here’s the Description field in this case:
“Description”: “Remove VM from protection group. Success. Completed successfully. ”
I can’t see anything else in the event payload delivered by the RESTful endpoint that is a VM or vOrg Id. The Id just happens to be part of the description rather than part of the API (i.e. a property in its own right). Is this by design or accidental? Is it always guaranteed to be there?
The resource report information is far richer and provides more information, in particular the vOrg Id which is critical for our needs. But can it provide a timeline of entering/leaving protection with the appropriate context (VM Id, vOrg Id, possibly vCloud instance).
Finally, is there anything in an event or resource report that indicates which vCloud Director owns the VM?
I’m waiting for access to a Zerto instance so I can start experimenting.
Sean MApril 13, 2017 12:15:49 PMPeter, we can get this one entered as an API enhancement request if you connect directly with your Zerto Cloud SE:
“there is no VM iD or vOrg Id in the event for leaving protection”
Note the Resource Report does not today provide timelines. What’s the business driver here so we can write up a feature request for that?
Peter CApril 13, 2017 12:30:05 PMHi Sean,
Thanks for your response. It’s my understanding that you’ve confirmed the events API can only tell us when a VM entered protection and not when it left.
Can the resource reports API tell us when a VM has entered or left protection? Looking at resource report information there doesn’t seem to be that data present.
Fundamentally, how can I determine the timeline of entering and leaving protection for a VM?
I’d appreciate knowing if this is possible at the moment instead of a wasted journey playing with the API.
cheers,
Peter
Sean MApril 13, 2017 12:42:43 PMThe EventsAPI does have filters for ProtectVM and UnprotectVM. What it missing to the best of my knowledge is specifically getting the VM or vOrg ID from the Events API.
I’ll go back to the business need / use case question so we can better identify if it’s possible to address the challenge today or if this could only be done through a product enhancement. Technicals aside, what’s the specific problem you’re looking to solve?
EDIT:
To be clear, I know you’re looking for this: “how can I determine the timeline of entering and leaving protection for a VM”, the question is the business use case, as opposed to the technical need. This can help track things down internally since the majority of the time we’re identifying internal docs/KBs by business problem.
Lastly there’s a whitepaper full of API samples which I always point people to prior to having them dig through the API – to your point it could be a wasted journey or just reinventing the wheel when we’ve already done it for you. Check out theย Automating Zerto Virtual Replication with PowerShell & REST APIs Whitepaper.
Peter CApril 13, 2017 01:13:34 PMHi Sean,
The business case is pricing. We supply cloud services and wish to charge for the periods when a VM is under protection. From a monitoring perspective it would also be useful to build up a picture of what is happening inside our virtual estate.
Munging together the protect and unprotect events would be a step forward but as we note, there is not enough information in an event yet.
I’ll have a trawl through the whitepapers etc. We’re Java-based so powershell is a no-no. REST is good enough (although an event-based solution – such as a messaging queue – is preferable to polling.
PS I don’t know if we have a direct contact at Zerto but can find out.