<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Logical Operations in Webhook Payload in Alerting</title>
    <link>https://community.dynatrace.com/t5/Alerting/Logical-Operations-in-Webhook-Payload/m-p/121268#M1654</link>
    <description>&lt;P&gt;We can do some logical operations in AppDynamics to match the fields of BMC Truesight in the custom webhook integrations. Is there a way to accomplish this in Dynatrace? Because the moment I start writing some code, I immediately get a syntax error.&lt;/P&gt;&lt;P&gt;I also wonder how can we dive into JSON object of {impactedEntities} to extract only the entity name instead of long explanation in {impactedEntity}, such as "CPU increase at abcHost" ?&lt;/P&gt;&lt;P&gt;Below is the code we're using in AppDynamics integration right now...&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;[&lt;BR /&gt;{&lt;BR /&gt;"eventSourceHostName":&amp;nbsp;"APMTEST",&lt;BR /&gt;"eventSourceIPAddress":&amp;nbsp;"xx.xx.xx.xx",&lt;BR /&gt;#if(${latestEvent.node.name})&lt;BR /&gt;"eventSourceHostName":&amp;nbsp;"${latestEvent.node.name}",&lt;BR /&gt;"eventSourceIPAddress":&amp;nbsp;"",&lt;BR /&gt;#end&lt;BR /&gt;"attributes":&amp;nbsp;{&lt;BR /&gt;"CLASS":&amp;nbsp;"APM_EV",&lt;BR /&gt;"controllerUrl":&amp;nbsp;"${controllerUrl}",&lt;BR /&gt;"accountId":&amp;nbsp;"${account.id}",&lt;BR /&gt;"accountName":&amp;nbsp;"${account.name}",&lt;BR /&gt;"mc_object":&amp;nbsp;"${latestEvent.tier.name}",&lt;BR /&gt;"mc_object_uri":&amp;nbsp;"${latestEvent.deepLink}",&lt;BR /&gt;#if(${latestEvent.healthRule.name})&lt;BR /&gt;"mc_parameter":&amp;nbsp;"${latestEvent.healthRule.name}",&lt;BR /&gt;"mc_tool":&amp;nbsp;"${latestEvent.healthRule.name}_${latestEvent.severity}",&lt;BR /&gt;"mc_smc_alias":&amp;nbsp;"${latestEvent.healthRule.name}",&lt;BR /&gt;#end&lt;BR /&gt;"mc_service":&amp;nbsp;"${latestEvent.application.name}",&lt;BR /&gt;"mc_priority":&amp;nbsp;"PRIORITY_1",&lt;BR /&gt;#if(${latestEvent.severity}=="ERROR") ----&amp;gt;&amp;gt;&amp;nbsp;HOW CAN WE WRITE THIS?&lt;BR /&gt;"severity":&amp;nbsp;"CRITICAL",&lt;BR /&gt;#end&lt;BR /&gt;#if(${latestEvent.severity}=="WARN") ----&amp;gt;&amp;gt;&amp;nbsp;HOW CAN WE WRITE THIS?&lt;BR /&gt;"severity":&amp;nbsp;"MAJOR",&lt;BR /&gt;#end&lt;BR /&gt;#if(${latestEvent.severity}=="INFO") ----&amp;gt;&amp;gt;&amp;nbsp;HOW CAN WE WRITE THIS?&lt;BR /&gt;"severity":&amp;nbsp;"OK",&lt;BR /&gt;#end&lt;BR /&gt;"msg":&amp;nbsp;"$!{latestEvent.summaryMessage.replace('&amp;lt;br&amp;gt;',' ').replace('&amp;lt;b&amp;gt;','').replace('&amp;lt;/b&amp;gt;','')}",&lt;BR /&gt;"mc_long_msg":&amp;nbsp;"$!{latestEvent.eventMessage.replace('&amp;lt;br&amp;gt;',' ').replace('&amp;lt;b&amp;gt;','').replace('&amp;lt;/b&amp;gt;','')}"&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;]&lt;/PRE&gt;</description>
    <pubDate>Mon, 01 Feb 2021 12:41:09 GMT</pubDate>
    <dc:creator>serhat_balik</dc:creator>
    <dc:date>2021-02-01T12:41:09Z</dc:date>
    <item>
      <title>Logical Operations in Webhook Payload</title>
      <link>https://community.dynatrace.com/t5/Alerting/Logical-Operations-in-Webhook-Payload/m-p/121268#M1654</link>
      <description>&lt;P&gt;We can do some logical operations in AppDynamics to match the fields of BMC Truesight in the custom webhook integrations. Is there a way to accomplish this in Dynatrace? Because the moment I start writing some code, I immediately get a syntax error.&lt;/P&gt;&lt;P&gt;I also wonder how can we dive into JSON object of {impactedEntities} to extract only the entity name instead of long explanation in {impactedEntity}, such as "CPU increase at abcHost" ?&lt;/P&gt;&lt;P&gt;Below is the code we're using in AppDynamics integration right now...&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;[&lt;BR /&gt;{&lt;BR /&gt;"eventSourceHostName":&amp;nbsp;"APMTEST",&lt;BR /&gt;"eventSourceIPAddress":&amp;nbsp;"xx.xx.xx.xx",&lt;BR /&gt;#if(${latestEvent.node.name})&lt;BR /&gt;"eventSourceHostName":&amp;nbsp;"${latestEvent.node.name}",&lt;BR /&gt;"eventSourceIPAddress":&amp;nbsp;"",&lt;BR /&gt;#end&lt;BR /&gt;"attributes":&amp;nbsp;{&lt;BR /&gt;"CLASS":&amp;nbsp;"APM_EV",&lt;BR /&gt;"controllerUrl":&amp;nbsp;"${controllerUrl}",&lt;BR /&gt;"accountId":&amp;nbsp;"${account.id}",&lt;BR /&gt;"accountName":&amp;nbsp;"${account.name}",&lt;BR /&gt;"mc_object":&amp;nbsp;"${latestEvent.tier.name}",&lt;BR /&gt;"mc_object_uri":&amp;nbsp;"${latestEvent.deepLink}",&lt;BR /&gt;#if(${latestEvent.healthRule.name})&lt;BR /&gt;"mc_parameter":&amp;nbsp;"${latestEvent.healthRule.name}",&lt;BR /&gt;"mc_tool":&amp;nbsp;"${latestEvent.healthRule.name}_${latestEvent.severity}",&lt;BR /&gt;"mc_smc_alias":&amp;nbsp;"${latestEvent.healthRule.name}",&lt;BR /&gt;#end&lt;BR /&gt;"mc_service":&amp;nbsp;"${latestEvent.application.name}",&lt;BR /&gt;"mc_priority":&amp;nbsp;"PRIORITY_1",&lt;BR /&gt;#if(${latestEvent.severity}=="ERROR") ----&amp;gt;&amp;gt;&amp;nbsp;HOW CAN WE WRITE THIS?&lt;BR /&gt;"severity":&amp;nbsp;"CRITICAL",&lt;BR /&gt;#end&lt;BR /&gt;#if(${latestEvent.severity}=="WARN") ----&amp;gt;&amp;gt;&amp;nbsp;HOW CAN WE WRITE THIS?&lt;BR /&gt;"severity":&amp;nbsp;"MAJOR",&lt;BR /&gt;#end&lt;BR /&gt;#if(${latestEvent.severity}=="INFO") ----&amp;gt;&amp;gt;&amp;nbsp;HOW CAN WE WRITE THIS?&lt;BR /&gt;"severity":&amp;nbsp;"OK",&lt;BR /&gt;#end&lt;BR /&gt;"msg":&amp;nbsp;"$!{latestEvent.summaryMessage.replace('&amp;lt;br&amp;gt;',' ').replace('&amp;lt;b&amp;gt;','').replace('&amp;lt;/b&amp;gt;','')}",&lt;BR /&gt;"mc_long_msg":&amp;nbsp;"$!{latestEvent.eventMessage.replace('&amp;lt;br&amp;gt;',' ').replace('&amp;lt;b&amp;gt;','').replace('&amp;lt;/b&amp;gt;','')}"&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;]&lt;/PRE&gt;</description>
      <pubDate>Mon, 01 Feb 2021 12:41:09 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Alerting/Logical-Operations-in-Webhook-Payload/m-p/121268#M1654</guid>
      <dc:creator>serhat_balik</dc:creator>
      <dc:date>2021-02-01T12:41:09Z</dc:date>
    </item>
    <item>
      <title>Re: Logical Operations in Webhook Payload</title>
      <link>https://community.dynatrace.com/t5/Alerting/Logical-Operations-in-Webhook-Payload/m-p/121269#M1655</link>
      <description>&lt;P&gt;You cannot write any kind of logic in Webhook payloads. &lt;/P&gt;&lt;P&gt;&lt;A rel="noopener noreferrer" href="https://www.dynatrace.com/support/help/setup-and-configuration/integrations/third-party-integrations/problem-notification-systems/webhook-integration/" target="_blank"&gt;https://www.dynatrace.com/support/help/setup-and-configuration/integrations/third-party-integrations/problem-notification-systems/webhook-integration/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;You can only use existing placeholders that are in documentation above. I think it may be good idea to post new product idea about this feature. &lt;/P&gt;&lt;P&gt;Sebastian &lt;/P&gt;</description>
      <pubDate>Tue, 02 Feb 2021 09:33:40 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Alerting/Logical-Operations-in-Webhook-Payload/m-p/121269#M1655</guid>
      <dc:creator>skrystosik</dc:creator>
      <dc:date>2021-02-02T09:33:40Z</dc:date>
    </item>
  </channel>
</rss>

