Splunk AppDynamics

Need information on how to dynamically send the performance of the API's to the Analytics custom event schema created.

PepsiCo_TCSPEPA
Explorer

Hi,

We want to monitor the Health of the API's using the Analytics Custom event schema. 
To achieve this we have created the schema using postman and published the data to the event schema we have created. 
But, how we can replicate this for monitoring the API Performance. Can you please let us know how can we achieve this.

Thanks,
Vijay. 

Labels (1)
0 Karma
1 Solution

Morelz
Builder

Hi Vijay

I am struggling to understand what your problem is. Are you having difficulty understanding the documentation on how to post the response data into the Analytics schema?

You have created an analytics schema, and you can now post data into that schema. 

Your schema you created, it needs to have the fields that you want to populate

Your schema you created has 3 fields

Account, Amount & Product

Are these the 3 fields that you will be populating with the response from the python script you are building?

If so you can then just publish the data into the schema

Here is an example of a publish for one of my test schemas

curl -X POST "https://<analytics url>/events/publish/<schema name>" -H "X-Events-API-AccountName:xxxxxxxx" -H "X-Events-API-Key:xxxxxxxx" -H "Content-type: application/vnd.appd.events+json;v=2" -d '[{"statusDateTime": 1597135561333, "moduleName": "XXXXXXX1", "componentType": "XXXXX", "componentName": "XXXXXXX", "statusName": "XXXXXX", "statusDescription": "XXXXXXXXX", "state": 1, "status": 1}]'

Documentation below

https://docs.appdynamics.com/appd/23.x/latest/en/extend-appdynamics/appdynamics-apis/analytics-event...

You can also look at this link, seems there is a way to get the okta token using selenium. Might be an option to use it in synthetics:)

https://hmh.engineering/how-to-use-selenium-to-inject-okta-authentication-tokens-into-rest-assured-e...

Ciao

View solution in original post

0 Karma

Morelz
Builder

Hi Vijay

Your question isn't clear. Can you explain in more detail what you want to do?

The first part, are we understanding correctly, are you monitoring the health of API's using some software, and you are then sending this data into a custom analytics schema? 

The second part is not clear , what do you mean replicate monitoring?

0 Karma

PepsiCo_TCSPEPA
Explorer

Hi,

Till now as per the documentation, we have created a schema and published the sample data to the schema manually from postman.
Now we want to monitor the performance of the API's using analytics schema. we would like to know how can we achieve this.

0 Karma

Morelz
Builder

Hi Vijay

Your question is still unclear

What api's are you referring to?, and how are you wanting to monitor them?

Can you clearly explain what you are trying to in detailed steps for us to assist

0 Karma

PepsiCo_TCSPEPA
Explorer

Hi Mario,

Greetings!
1. We have created a schema in Analytics using postman. We have used the below payload from the documentation.
payload: "schema" : { "account": "integer", "amount": "float", "product": "string" }
2. Post creating the schema we have published the below data to the analytics schema we have created using postman.
Response: [     {       "account": 10,       "amount": 10.6,       "product": "test"    } ]
3. Now, we are having a use case/project to enable the API Monitoring to the Mobile API's. Team has shared the 10 API's to monitor. So, to monitor the response code of the API's we need to provide okta-access token to access the API's.

For getting the okta-access token we need to login to the web browser and open the okta authentication website and need to get the okta access token from there. I believe we cannot implement this scenario in the synthetic api monitoring.

To achieve that we are writing a python script using this script we will fetch the response from the Mobile API's and will post the collected response details to the Analytics schema we have created. Do you have any idea on this.

Please let us know if you need any additional information.

0 Karma

Morelz
Builder

Hi Vijay

I am struggling to understand what your problem is. Are you having difficulty understanding the documentation on how to post the response data into the Analytics schema?

You have created an analytics schema, and you can now post data into that schema. 

Your schema you created, it needs to have the fields that you want to populate

Your schema you created has 3 fields

Account, Amount & Product

Are these the 3 fields that you will be populating with the response from the python script you are building?

If so you can then just publish the data into the schema

Here is an example of a publish for one of my test schemas

curl -X POST "https://<analytics url>/events/publish/<schema name>" -H "X-Events-API-AccountName:xxxxxxxx" -H "X-Events-API-Key:xxxxxxxx" -H "Content-type: application/vnd.appd.events+json;v=2" -d '[{"statusDateTime": 1597135561333, "moduleName": "XXXXXXX1", "componentType": "XXXXX", "componentName": "XXXXXXX", "statusName": "XXXXXX", "statusDescription": "XXXXXXXXX", "state": 1, "status": 1}]'

Documentation below

https://docs.appdynamics.com/appd/23.x/latest/en/extend-appdynamics/appdynamics-apis/analytics-event...

You can also look at this link, seems there is a way to get the okta token using selenium. Might be an option to use it in synthetics:)

https://hmh.engineering/how-to-use-selenium-to-inject-okta-authentication-tokens-into-rest-assured-e...

Ciao

0 Karma
Get Updates on the Splunk Community!

Get Schooled with Splunk Education: Explore Our Latest Courses

At Splunk Education, we’re dedicated to providing incredible learning experiences that cater to every skill ...

Splunk AI Assistant for SPL | Key Use Cases to Unlock the Power of SPL

Splunk AI Assistant for SPL | Key Use Cases to Unlock the Power of SPL  The Splunk AI Assistant for SPL ...

Buttercup Games: Further Dashboarding Techniques (Part 5)

This series of blogs assumes you have already completed the Splunk Enterprise Search Tutorial as it uses the ...