Splunk AppDynamics

Need a custom variable for split the variable output

Ashish_Saxena3
Explorer

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}"
}

}
]

Labels (3)
0 Karma
1 Solution

Morelz
Builder

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

image.png

Ciao

View solution in original post

Morelz
Builder

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

image.png

Ciao

Get Updates on the Splunk Community!

Fueling your curiosity with new Splunk ILT and eLearning courses

At Splunk Education, we’re driven by curiosity—both ours and yours! That’s why we’re committed to delivering ...

Splunk AI Assistant for SPL 1.1.0 | Now Personalized to Your Environment for Greater ...

Splunk AI Assistant for SPL has transformed how users interact with Splunk, making it easier than ever to ...

Unleash Unified Security and Observability with Splunk Cloud Platform

     Now Available on Microsoft AzureOn Demand Now Step boldly into the AI revolution with enhanced security ...