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

Need a custom variable for split the variable output

Ashish.Saxena
Discoverer

Hello,

Please help if some has done this before,

I need custom variable to split the variable output for my applications (xyzabc.com [P], abcxyz.com [G] & xyz123.com [S]) 

Output should be:
Application=[P]
Application=[S]
Application=[G]
_______

Please refer the below payload which I am using :

[
{
"labels": {
"Message": "A health rule violation occurred for the application ${latestEvent.application.name}",
"Time_of_Occurrence": "${action.triggerTime}",
"source": "AppD",
"Application_Name": "${latestEvent.application.name}",
"Event_Name": "${latestEvent.displayName}",
"Event_Message" : "${latestEvent.eventMessage}",
},
"annotations":
{
"type": "image",
"src": "${latestEvent.severityImage.deepLink}",
"alt": "${latestEvent.severity}",
"type_link": "link",
"href": "${latestEvent.deepLink}",
"text": "View this transaction in AppDynamics",
"Event_Message" : "${latestEvent.eventMessage}"
}

}
]

1 REPLY 1

Mario.Morelli
Architect

Hi Ashish

It uses Apache Velocity as an intermediary translator through which variables get resolved. Anything that is supported in https://velocity.apache.org/

Examples below, you can use an if statement for what you require

MarioMorelli_0-1675324782688.png

Ciao

 



Found something helpful? Click the Accept as Solution button to help others find answers faster.
Liked something? Click the Thumbs Up button.

Learn more about me in the Community Member Spotlight Q & A