21 Jan 2021 01:28 PM - last edited on 12 May 2021 02:32 PM by MaciejNeumann
There are multiple placeholders to send with webhook such as {ImpactedEntity}, {Tags}, etc..
But I couldn't find a way to send Manage Zone Name of the impacted entities. Do you guys have ever tried to tackle this problem?
Solved! Go to Solution.
21 Jan 2021 01:51 PM
Hello @MUSTAFA SERHAT B.
The placeholder is not available at the moment to explicitly define the management zone in the subject/message of the email incident.
Regards,
Babar
21 Jan 2021 02:12 PM
Keep in mind that management zones can overlap, a given host can be in multiple management zones and that must be accounted for. Depending on what you're trying to do if the notification is filtered to a single management zone you could just 'hardcode' the management zone name into the payload. Otherwise perhaps just creating corresponding tags would be an option.
26 Jan 2021 08:18 AM
Still, a placeholder of an array of management zones could be useful in some use cases. Typically tags and MZ are might have similar scop in the deployments, but they are not interchangable.
29 Jan 2021 10:11 AM
Thank you guys for the answers. We will go with Manual payload option for now.
If you don't mind I want to ask two more related questions. We're moving from AppDynamics to Dynatrace and we're integrating this with BMC Truesight.
1. {impactedEntity} sends a message something like "CPU increase at abcHost"
We just want to send the abcHost part. The explanation part is redundant in our situation, and I couldn't wrap my head around how to get this part from the other option {impactedEntities} JSON list.
2. It is possible to use logical syntax in AppDynamics which helps to send Event type that is more compatible with BMC. In Dynatrace I immediately get a syntax error when I try something like the code below.
[
{
"eventSourceHostName": "APMTEST",
"eventSourceIPAddress": "xx.xx.xx.xx",
#if(${latestEvent.node.name})
"eventSourceHostName": "${latestEvent.node.name}",
"eventSourceIPAddress": "",
#end
"attributes": {
"CLASS": "APM_EV",
"controllerUrl": "${controllerUrl}",
"accountId": "${account.id}",
"accountName": "${account.name}",
"mc_object": "${latestEvent.tier.name}",
"mc_object_uri": "${latestEvent.deepLink}",
#if(${latestEvent.healthRule.name})
"mc_parameter": "${latestEvent.healthRule.name}",
"mc_tool": "${latestEvent.healthRule.name}_${latestEvent.severity}",
"mc_smc_alias": "${latestEvent.healthRule.name}",
#end
"mc_service": "${latestEvent.application.name}",
"mc_priority": "PRIORITY_1",
#if(${latestEvent.severity}=="ERROR") ---->> HOW CAN WE WRITE THIS?
"severity": "CRITICAL",
#end
#if(${latestEvent.severity}=="WARN") ---->> HOW CAN WE WRITE THIS?
"severity": "MAJOR",
#end
#if(${latestEvent.severity}=="INFO") ---->> HOW CAN WE WRITE THIS?
"severity": "OK",
#end
"msg": "$!{latestEvent.summaryMessage.replace('<br>',' ').replace('<b>','').replace('</b>','')}",
"mc_long_msg": "$!{latestEvent.eventMessage.replace('<br>',' ').replace('<b>','').replace('</b>','')}"
}
}
]