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

Dynatrace API: How can I get all of the calls to a service within a certain timeframe?

sean_worle
Newcomer

I've been digging around int he docs for the Dynatrace API, and I've got some of the pieces I'm looking for, but I'm hoping someone can help me close the loop here.

By calling the "Topology & Smartscape - Process Group" API, I can get the entityIds for a particular web service we want to get information for. Under this Process Group, there are three "ProcessGroupInstances", which I assume is because we are load-balancing this service amongst three servers. There are also a handful of "toRelationships". These entityIds match up with results that I can get from the "Toppology & Smartscape - Service" API. I don't know why our single web service results in so many "Services" in this API, but whatever.

So, now I have a list of entityIds that represent the web service I need to gather information for. What I need to do is find out all of the calls that are made to this service in a particular time period - specifically, I need to find out the names of the calling processes that have made calls to this web service, and (ideally) what machine name or IP address those calls originated from.

The "Events" API seemed like the logical choice, but filtering by any of the entityIds of my web service came up with no results, even when going back a week. I'm thinking perhaps the Events API doesn't actually have what I want, because when I don't filter by entityId at all, the only events I see are things like process restarts.

So, given that I have an entityId for a service, what API can I call to get back all of the calls that processes have made to the service that entityId represents?

 

7 REPLIES 7

Julius_Loman
DynaMight Legend
DynaMight Legend

You cannot get the individual calls via API (meaning PurePaths). You can only retrieve metrics via the timeseries api (throughput, failures, ... ) for a service. Unfortunately, I think you cannot do any advanced filtering at the moment such a number of calls originating from a particular service.

If it's just about the name of the originating processes, you can fetch them via the smartscape service api for each service your calls are originating from.


Certified Dynatrace Master | Alanata a.s., Slovakia, Dynatrace Master Partner

nj_njoku
Inactive

Hi,

Just to ensure I understand correctly, are you looking for a way to get the names of the processes whose services call out to a particular service? Please confirm.

Thanks

NJ


sean_worle
Newcomer

@Ugochukwu N. - Well, you say "process whose services call..." The calls may not be coming from services, they could be from programs being run as a nightly batch, they could be from desktop applications, they could be web controllers, they could be other services. But I think Dynatrace may call all of these things "Services". If that's the case, then yes, I think you are understanding correctly.

@Július L. - I had been hoping to actually see all of the calls (PurePaths, as you say), but I think that using the Smartscape API should almost get what I'm looking for. The thing is, it doesn't seem to have some calls I'm looking for. There are calls that I KNOW are being made to the service that do not appear in the Smartscape API at all. I suspect maybe Smartscape is not seeing any calls from a client that does not have a Dynatrace agent installed on it. I had hoped that by seeing all of the individual calls to the service, I could fill that gap.


Yes, I think you are correct with your suspicion. Smartscape shows inter-service relations only for services where oneagent is installed. If you are receiving calls from other entities such as client, then it will not be included in those relations.

Individual calls (purepaths) are not exposed via API.


Certified Dynatrace Master | Alanata a.s., Slovakia, Dynatrace Master Partner

Getting licenses to install the agent on all of our users machines would be prohibitively expensive. Is there no way to discover calls to a service from machines without agents? In PurePaths in the UI, such calls show up as "Unknown Caller" - this is not ideal, but would be a start, at least. However, not having access to PurePaths information from the API makes this impossible as well. Any suggestions on how we could solve this?


Can you please post a screenshot of this "Unknown caller"? I don't remember seeing this in the UI.

So based on your answer you are trying to find a list of clients for your service. At least there is an option to setup a request attribute to capture the client address. Then you can see the list of "top" clients in the request attribute sections for a service.

Are you looking for a complete list of clients of your service?


Certified Dynatrace Master | Alanata a.s., Slovakia, Dynatrace Master Partner

Hrm, for some reason, I thought that's what I had seen before. However, I am now unable to find it. so maybe I was conflating that with something else.

Yes, my goal is to check Dynatrace periodically (possibly daily) and build a lit of clients that call our services. Secondarily, it would be nice to also get some statistics about these clients - last time they called the service, volume of calls from each client, etc. However, the base goal is a continually updating list of consumers of each service.


Featured Posts