Hi, I am monitoring a java application hosted on a few servers/hosts using oneagent license. Dynatrace marks a number of requests as 'Request to unmonitored hosts' and 'Requests to Public Networks'. These are basically 'Called services' for third party calls or requests going to internal unmonitored hosts. My question is- I want to fetch data like 'Response Time' and 'Request Count' for all these services using Rest API.
Currently what I find is - Creating key requests for each one of them and creating calculated metric for each one of them (Response time and request count separately) and fetching them one by one. The process is tedious and requires huge amount of effort for large number of services. Is there a better way to do this or fetch the data directly?
Solved! Go to Solution.
You might have some success defining them as a separate service:
That will open new possibilities regarding fetching data through the API.
Hi Antonio, I actually did that and by saying 'creating key request' in my question, I actually meant marking them as a 'separate service'. But the problem is - Once they are created as a separate service, they mix into the entire services list and parsing them gets difficult. Especially when responses return service-IDs rather than human readable service names. So, there are 2 challenges: 1. Sorting them out from the entire list of services
2. Converting the service-Ids into service names.
For point 1. I could resolve it by creating tags and assigning it to services that I want to fetch through the APIs. The APIs then use filter paramater and gets back response for only the tagged services.
For Point 2. I manually added a list of <key:value> pairs into my code where keys are the service ids and values are the service names. The Api response is then parsed and compared against this list of key:value pairs. The metric values are then allotted accordingly to the backend.
This process is cumbersome and may require frequent modifications from time to time. If you are someone who needs to monitor a dynamic list of services, Point 2 may not work for you. I just hope there is some better way to do this completely through the api rather than hard coding values. Please Let me know if there is a better way?