You can create a payload template for an outbound plugin of your choice in VMware Aria Operations.
Use payload templates to configure the payload of an email, and customize the subject line, and email body. You can enable your own input properties and different payloads for updated and canceled alerts.
You can customize payloads only for Standard Email Plug-in and Webhook Notification Plug-in.
Procedure
- From the left menu, click Configure > Alerts, and then in the right pane, click Payload Templates. On the toolbar, click Add to create a new payload template.
- In the Details tab, enter the basic details of the payload template.
Option Description Name Provide a name for the payload template. Description Enter a description for the payload template. Outbound Method Outbound plugin for which you want to create a new payload template. Select Plug-In Type: Type of plugin. Select one of the outbound alert plug-in types: Standard Email Plugin, Webhook Notification Plugin, Service-Now Notification Plugin, and Slack Plugin.
- Click Next.
- In the Object Content tab, define the object details that you want to include in the notifications.
Note: To create a payload template, it is mandatory to add the object type for all the outbound plugin types except for the Standard Email Plugin and Webhook Notification Plugin.
Option Description Add Object Type Select an object type from the list. Once you select the object type, define the metrics, properties, parents, and ancestors associated with the object type that you want to include in the notification.
For example, if you select Datacenter as an object type, click Edit to define the metrics, properties, parents, and ancestors associated with it.
From the right pane, double-click or drag the metrics and properties into the Metrics and Properties box. You can select up to 30 metrics and properties.
Define the parent host or cluster information that you want to include in the notification. From the right pane, double-click or drag the parent and ancestors information into the Parents and Ancestors box.
The information that you define here will be included in the alert notification for all the plug-ins. However, for a Webhook Notification Plugin and Standard Email Plugin, the information will be included only when you define the values in the Payload Details tab.
- Click Create to create the new payload template or click Next if you are creating a payload template for a Standard Email Plugin or a Webhook Notification Plugin.
- In the Payload Details tab, enter the payload details that you want to include in the notification.
Note: This tab is available only when you are creating a payload template for a Standard Email Plugin or a Webhook Notification Plugin.
Option Description Do you want to add template input properties? Select Yes to add input properties and enter the Key, Type, Display Name, and Description of the input property. Otherwise, select No. Note: The input properties are specific to your endpoint. Once you define the input properties in the template, you must provide the appropriate values in each rule where this template will be used.Do you want different payload details for new, updated, and canceled alerts? Select Yes to define different payload details for new, updated, and canceled alerts. Otherwise, select No. The following fields appear while creating a payload template for the Standard Email Plugin. Subject Enter a subject for the email notification. Body Enter the content for the email notification. You can also search for parameters in the right pane. Click the copy icon next to the parameter to copy the parameter and you can paste the parameter in the email body. You can use the options in the toolbar to edit, format, and highlight the email content.
Note: You can set up different email content for new, updated, and canceled alerts.The following fields appear while creating a payload template for the Webhook Notification Plugin. Endpoint URL Enter the endpoint URL. The endpoint URL will be appended to the base URL provided in the related webhook outbound instance. Note: The entire URL is encoded. However, there is an exception to use the character '/' in the URL.Content Type Select the content type for the payload. Custom Headers Enter the HTTP Custom Header Name and Value. Click the plus icon to add multiple custom headers. Note: For webhook payloads using token-based authentication, add an Authorization Header in the format required by the endpoint.HTTP Method Select the HTTP method of request. Payload of the request Payload for the selected plug-in type. It displays information based on the selected metrics, properties, ancestors, and object types. You can search for parameters in the right pane. Click the copy icon next to the parameter to copy the parameter and you can paste the parameter in the Payload of the request box.
- Click Create.
Once the payload template is created, you can view it in the Payload Templates page. After selecting a payload template in the notification rule, you can view the payload template details in the Notifications page.