cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Management Zone Name inside Webhook Payload

serhat_balik
Helper

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?

4 REPLIES 4

Babar_Qayyum
DynaMight Guru
DynaMight Guru

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

JamesKitson
Dynatrace Guru
Dynatrace Guru

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.

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.

Certified Dynatrace Master | Alanata a.s., Slovakia, Dynatrace Master Partner

serhat_balik
Helper

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>','')}"
}
}
]

Featured Posts