VMware Cloud Community
vmsiul
Enthusiast
Enthusiast
Jump to solution

vRA 8.x email notifications to Service Broker users

Hello, 

I apologize if this was asked here before but I haven't seen any posts for it. 

We are having some issues with the default email notification messages that are being sent to the users when the deployment is about to expire. They don't have enough time since the default one is 3 days before the lease expires. That's becoming a problem because the users aren't able to react that quickly and in some cases they have missed the email and the deployments have been purged. 

https://docs.vmware.com/en/vRealize-Automation/8.10/Using-and-Managing-Service-Broker/GUID-AD894121-...

That being said, is there any way we can get an email notification sent 14 days before the deployment is expired and then maybe 7 days, etc. 

Has someone been able to accomplish that and has a process that can share with us?

Thank you 

0 Kudos
1 Solution

Accepted Solutions
Ankush11s
VMware Employee
VMware Employee
Jump to solution

No currently out of box email notification will be trigger 3 days before actual lease and then another email system will trigger when lease is expired .

Out of box we can not, but we can create custom workflow in vRO and prepare the logic 
then schedule this to run once in day or twice in day

logic should be get all deployment using 

deployment/api/deployments

then read the lease expire date  and compare with current date then if it is less than 24 hours send email or extend lease anything you can do .
Note: for Above suggestion to make it would we need to handle pagination as well , if you know how to write workflow and work with API it should be do able 

If we want to rely on system then Grace period and rely on 2 emails one is about to expire and 2nd expired 

Mark this thread as resolved if it has resolved your query.

View solution in original post

0 Kudos
7 Replies
Ankush11s
VMware Employee
VMware Employee
Jump to solution

Default email notification of lease expiry is 3 days , Currently we can not amend to user defined numbers 
If 3 days is less for to react , you can configure lease policy and configure Grace period for like 7 or user defined days

Once lease is expired , VM will be powered off , but it won't be deleted from system until grace period is not completed , and User can come up during this grace period and extend the lease and power on the machine back 


0 Kudos
vmsiul
Enthusiast
Enthusiast
Jump to solution

Hello. Thanks for your reply. How would you configure that additional lease policy and the grade period for 7 days for example? What do you mean with “or user defined days?”

Would it be possible no notify the user one more time when the above happens and send some custom message as a reminder. Something on an event or other value? 

Thank you! 

0 Kudos
Ankush11s
VMware Employee
VMware Employee
Jump to solution

You can configure lease policy in Service broker 
attaching sample screenshot

Ankush11s_0-1677664792724.png

Here is the documentation about lease and each field and its important 
https://docs.vmware.com/en/vRealize-Automation/SaaS/Using-and-Managing-Service-Broker/GUID-87B2B204-...

Also on your 2nd ask about notification, we do not have event for lease expiry which will trigger task .
but with 8.11.1 now you can customise the email template.

Ankush11s_1-1677665247303.png

 

0 Kudos
vmsiul
Enthusiast
Enthusiast
Jump to solution

Thanks for clarifying. If you meant you do not have an event for lease expiry then how can I trigger the task? 
Could you explain a little more how to use the custom email template to link it to the task or anything that could trigger that custom email template that could be use for this scenario? 

thanks again! 

0 Kudos
Ankush11s
VMware Employee
VMware Employee
Jump to solution

 If you meant you do not have an event for lease expiry then how can I trigger the task? 
No we can not trigger the task based on event , we need to rely on policy to handle , Once you configure grace period configured , even if your deployment is expired , Deployment will remain in system but in powered off state, we can extend the lease and then power on.

Could you explain a little more how to use the custom email template to link it to the task or anything that could trigger that custom email template that could be use for this scenario? 

Custom email to modify the payload according to business/Organisation content , example you can put your Company name and stuff 
, we can not link to any task custom notification feature , and it is not intended to do as well .
Before this feature we used to get email with deployment is going to expire in 3 days , Now you can put extra content for each category will be included in that email or change branding etc stuff 
Please go through the release notes for more details  

0 Kudos
vmsiul
Enthusiast
Enthusiast
Jump to solution

Great, thanks for the info. One last question, would it be possible to resend this custom email more than once? Everything else discussed might work, but I can see the ask of having at least more than one time email to communicate this. Perhaps, send the email 1 time a day until we reached the 3 day of expiration. 

0 Kudos
Ankush11s
VMware Employee
VMware Employee
Jump to solution

No currently out of box email notification will be trigger 3 days before actual lease and then another email system will trigger when lease is expired .

Out of box we can not, but we can create custom workflow in vRO and prepare the logic 
then schedule this to run once in day or twice in day

logic should be get all deployment using 

deployment/api/deployments

then read the lease expire date  and compare with current date then if it is less than 24 hours send email or extend lease anything you can do .
Note: for Above suggestion to make it would we need to handle pagination as well , if you know how to write workflow and work with API it should be do able 

If we want to rely on system then Grace period and rely on 2 emails one is about to expire and 2nd expired 

Mark this thread as resolved if it has resolved your query.

0 Kudos