VMware Cloud Community
dtaliafe
Hot Shot
Hot Shot
Jump to solution

vROps Email Templates

I'm looking for anyone that has custom email templates working in vROps 6.1.  I followed this KB article:

VMware KB: Using custom email templates in vRealize Operations Manager 6.x

It was helpful, but setting conditions doesn't work as it describes.  I was getting a "500 Internal Server Error" when trying to set an email condition. After digging into the vROps API doc I found that you need to specify an "emailAddress" property for the email condition.  When I do this I get a HTTP 201 response and my request appears to work, but the template isn't used.  Email alerts for the type/subtype in the condition continue to use the default template.

I'm using the alert "Host SSH Service is running" for testing because it's easy to turn the service on and off on hosts.  So I've set the condition type to "Virtualization/Hypervisor" and subtype to "Compliance" like so:

<ops:alertType>16</ops:alertType>
<ops:alertSubType>21</ops:alertSubType>
<ops:alertStatus>NEW</ops:alertStatus>
<ops:emailAddress>vrops@mycompany.com</ops:emailAddress>
I've also tried using an alertStatus of "ACTIVE" and "CANCELED".  Canceled alerts also continue to use the default template.  I haven't tried other alert types.  I'll have to find an easy one to test with.  Any help or suggestions would be greatly appreciated.
0 Kudos
1 Solution

Accepted Solutions
dtaliafe
Hot Shot
Hot Shot
Jump to solution

Finally got this working with the help of VMware support.  The key was to use the recipient email address for the "emailAddress" value when you set the email condition.  You also need a notification rule for the email notification to be sent.

View solution in original post

0 Kudos
8 Replies
samr92
Contributor
Contributor
Jump to solution

Hi !

Have you found a solution ?

I have the same issue, i have applied all of things mentioned in the kb but the template isn'nt used. I have also tried to restart vRops,without success.

Anyone can help us ?

Thanks

0 Kudos
samr92
Contributor
Contributor
Jump to solution

Anyone ? :smileyconfused:

0 Kudos
dtaliafe
Hot Shot
Hot Shot
Jump to solution

Finally got this working with the help of VMware support.  The key was to use the recipient email address for the "emailAddress" value when you set the email condition.  You also need a notification rule for the email notification to be sent.

0 Kudos
samr92
Contributor
Contributor
Jump to solution

Hi dtaliafe,

Do I need to reboot vROPS or to do anything else ?

Because I have applied your modifications (replace the email adress) but without success...

I also have notifications rules...

Thanks in advance ! Smiley Happy

0 Kudos
dtaliafe
Hot Shot
Hot Shot
Jump to solution

You shouldn't have to restart vROps, but you might want to try that if it's not working.  I've had that fix other weird issues.  Make sure that the email address you used to set the email condition in the API is the same email address in your notification rule.  My notification rules are also set to the same type/subtype as the email condition although I'm not sure that's strictly required.  I haven't done a lot of testing on variations of notification rules.

0 Kudos
samr92
Contributor
Contributor
Jump to solution

Thanks you dtalife for your help !

I'll try all these things and I'll let you know Smiley Happy

0 Kudos
jeganrajk
Contributor
Contributor
Jump to solution

Hi,

How to add the hostname in email subject, need your help to do it.

 

Thanks.

0 Kudos
dtaliafe
Hot Shot
Hot Shot
Jump to solution

Try using {{AffectedResourceName}} in the subject line.  This should be the hostname for a host alert, or the datastore name, cluster name, etc, depending on the type of resource the alert is for.

0 Kudos