Splunk AppDynamics

Passing multiple Apps in via REST API to retreive metric data

Sundarapandian_
Path Finder

Hello,

Need to know the best way to retrieve metric data for multiple applications using a single rest call

http://sample:8090/controller/rest/applications/Monitor/metric-data?metric-path=Application%20Infras...

Above is a sample REST URL that we are using to pull the metric data, however is there a way to pass multiple App names to pull the same metric details in the same rest call?

Using a wild card works, but we specifically need to know if URI: /controller/rest/applications/<application-name|application-id>/problems/healthrule-violations can be used to

retrieve all health rule violations in a particular business application as mentioned in this doc. When tried it doesn't seem to be working

https://docs.appdynamics.com/display/PRO41/Use+the+AppDynamics+REST+API

Below is the query that i used

curl -X GET --user user@customer1:xxxx 'http://sample/controller/rest/applications/Monitor/problems/healthrule-violations&time-range-type=BEFORE_TIME&duration-in-mins=6'   (Monitor is the App name, i also tried with app id)

Kindly advise

Thanks,

Sundar

Labels (3)
0 Karma
1 Solution

Brian_Wheeldon
Contributor

My comment about AppDynamics applications is true. You need separate REST requests to pull metrics from different AppDynamics applications.

You have a machine agent extension that collects "Status" for a number of your applications. The machine agent extension plugs those metrics into a single AppDynamics application called "Monitor". You can use a wild card to pull multiple custom metrics from that AppDynamics application in one REST call as you demonstrated.

Your healthrule-violations REST URL has two problems:

1. First "&" should be a "?"

2. BEFORE_TIME should be BEFORE_NOW, or you need to specify "end-time" if you specify BEFORE_TIME.

Regards,

Brian Wheeldon

View solution in original post

0 Karma

Brian_Wheeldon
Contributor

All metric data in AppDynamics is segregated by application, with role based access control applied per application.

That means there is no way to retrieve metric data for multiple applications using a single REST call.

It's necessary to use a separate REST call for each application that you want to pull metrics from.

Regards,

Brian Wheeldon

0 Karma

Sundarapandian_
Path Finder

Hi Brian,

Thanks for your response

We are trying to pull some custom metric data uisng a machin agent extension. As mentioned, it does pull the metrics for multiple apps if a wild card used.

eq: http://sample/controller/rest/applications/Monitor/metric-data?metric-path=Application%20Infrastructure%20Performance%7Cappdctrl02%7CCustom%20Metrics%7CAppStatus%7C*%7CStatus&time-range-type=BEFORE_NOW&duration-in-mins=2

Also, the below query uses only a single App (Monitor is the App name) & it still doesnt work . Not sure if i miss something here

http://sample/controller/rest/applications/Monitor/problems/healthrule-violations&time-range-type=BEFORE_TIME&duration-in-mins=6

Thanks,

Sundar

0 Karma

Brian_Wheeldon
Contributor

My comment about AppDynamics applications is true. You need separate REST requests to pull metrics from different AppDynamics applications.

You have a machine agent extension that collects "Status" for a number of your applications. The machine agent extension plugs those metrics into a single AppDynamics application called "Monitor". You can use a wild card to pull multiple custom metrics from that AppDynamics application in one REST call as you demonstrated.

Your healthrule-violations REST URL has two problems:

1. First "&" should be a "?"

2. BEFORE_TIME should be BEFORE_NOW, or you need to specify "end-time" if you specify BEFORE_TIME.

Regards,

Brian Wheeldon

0 Karma

Sundarapandian_
Path Finder

Thanks. I made the corrections and it worked.

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

SOC4Kafka - New Kafka Connector Powered by OpenTelemetry

The new SOC4Kafka connector, built on OpenTelemetry, enables the collection of Kafka messages and forwards ...

Event Series: Level up your SOC: Advancing with Splunk Enterprise Security

AI has fundamentally raised the stakes for security operations, and this three-part series is your guide to ...

Announcing Modern Navigation: A New Era of Splunk User Experience

We are excited to introduce the Modern Navigation feature in the Splunk Platform, available to both cloud and ...