You can create a payload template for any outbound plug-in of your choice.
- From the left menu, click Payload Templates. On the toolbar, click Add to create a new payload template. , and then in the right pane, click
- 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 one of the outbound alert plug-in types: Log File Plugin, Standard Email Plugin, SNMP Trap Plugin, Webhook Notification Plugin, Slack Plugin, and Service-Now Notification 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 object type, click Edit to define the metrics, properties, parents, and ancestors associated to it.
On the right-hand side, 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. On the right-hand side, 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 on the right-hand side. 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 URL prefixed with the base URL provided in the 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. 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 on the right-hand side. 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.