Reimporting a notification rule with a modification of the name in the JSON file, results in the default payload template being set, instead of the custom payload template that was set in the original notification. An example of this behavior is showing in the screenshots below:
Observe that 'testsnow2' use the 'Default Service-Now Notification Plugin', rather than the custom 'testsn' payload template.
Environment
Aria Operations 8.18.x
Cause
This issue occurs if you only change the value for "Name" in the beginning of the file, and don't change the string under "ruleNameToTemplateNameMap" at the end of the file.
Create a notification which utilizes the newly created payload template
Export the notification as JSON file by navigating to Operations > Configurations > Notifications > Select the notification click on 3 dots > Click Export.
Open the JSON file in a text editor like notepad
Edit the exported notification JSON file and change the two entries highlighted in red : {"NotificationRules":{"notificationRules":[{"NotificationRule":{"id":{"@UUID":"########-####-####-####-############","@ObjectType":"NOTIFICATION_RULE"},"Name":"testsnow2","Description":"","PluginID":{"@pluginType":"GenericRestPlugin-servicenow","@pluginName":"test"},"PluginType":"GenericRestPlugin-servicenow","entry":{"ConditionType":"ALERT_HEARTBEAT","NotificationRuleAlertHeartbeatCondition":{"sendHeartbeat":false}},"Disabled":false,"RuleType":"GENERAL_RULE"}}],"notificationTemplateDataSet":[{"NotificationTemplateData":{"id":{"@UUID":"########-####-####-####-############","@ObjectType":"NOTIFICATION_TEMPLATE"},"Name":"testsn","Description":"","pluginTypeId":"GenericRestPlugin-servicenow","notificationTemplateType":"GENERAL","metricKeysAndRelatedResourceKindKeys":[{"entry":{"ResourceKindKey":{"@resourceKind":"VirtualMachine","@adapterKind":"VMWARE"},"MetricKeysAndRelatedResourceKindKeys":{"metricKeysSet":[{"MetricKey":[{"nodeList":{"nodes":{"MetricKeyNode":[{"name":"cpu"},{"name":"20_sec_peak_iowaitPct"}]}},"isProperty":false},{"nodeList":{"nodes":{"MetricKeyNode":[{"name":"cpu"},{"name":"demandmhz"}]}},"isProperty":false},{"nodeList":{"nodes":{"MetricKeyNode":[{"name":"cpu"},{"name":"capacity_contentionPct"}]}},"isProperty":false}]}],"ancestorKindKeyMetrics":[""],"descendantKindKeyMetrics":[""]}}}]}}],"ruleNameToTemplateNameMap":[{"entry":{"string":["testsnow2","testsn"]}}]}}
Save the file with a new name
Import the modified JSON file back into Aria Operations by navigating to; Operations > Configuration > Notifications > Click on 3 dots to the right of ADD button > Select Import > Browse for the file > You can leave the default Skip import in case of conflict > Click on Import . Example of notification after import showing in below screenshot