18 Feb 2020 11:39 AM
Hello,
I'm doing a Python script with different calls at the API exposed by Dynatrace for extract some data(.csv) and automize a creation of a high level report related to the generic application/s health.
At the moment I've done two calls using the "User Sessions" API(with USQL for query string) for extract the ten slowest user action and the ten most frequent user action for each application.
I would like to add more information via API for what concern the application's health, so..does anyone have done this kind of activity before and could give me some suggestions for what API calls could I use?
Thank you in advantage!
Roberto
Solved! Go to Solution.
18 Feb 2020 04:38 PM
Hi Roberto,
This type of report is pretty subjective, but metrics that I like to use for application health reporting are:
Application Response time,
Synthetic Availability,
Service response time, failure rate, throughput
If you like to get granular about hosts you could provide metrics related to their usage as well.
Depending if your applications are properly tagged you could also run a query onto the problems API and pull out some of the top recurring problems for a specific application.
Hope this helps.
-Dallas
19 Feb 2020 08:24 AM
Hi Dallas,
thank you for the suggestions.
The query onto the problems API for pull out some of the top recurring problems for a specific application is a good point and I was trying to do it but I don't know so good how to do it. You are talking about the problem feed API?
Thank you,
Roberto
19 Feb 2020 03:20 PM
Hey Roberto,
I have put together something very similar for a client.
Basically, I would poll the problems feed API endpoint and then parse through the JSON in Python. Then search each opened problem in the JSON file for the 'tagsOfAffectedEntities' key and look for whatever tag you use to identify an application as a value. Its not a perfect method because some problems have multiple application entities tagged, but it does a pretty good job.
Let me know if you need some help getting this set up.
-Dallas
19 Feb 2020 04:02 PM
Hello Dallas,
thanks for the answer. I've understood what you have done, but you did it for extract the frequent issue for one application?
Because I would extract this info like this:
If you have done something like this in Python I kindly ask you if you can share with me the code for help me to understood better how can I use it. Maybe it could help me also in the future.
i'm sorry but I'm a novice in python and I'm not so skilled.
Thanks a lot,
Roberto
19 Feb 2020 07:46 PM
Hey Roberto,
Unfortunately, I don't believe there is a way to query for "frequent issues" within the API.
This particular use case was to look at all the problems that have been opened and then parsing through those to assign them to application teams based on tag values. Once we had the data we could show them the top problems that were being opened over and over with again no action from their end.
I do see value in finding what issues are being suppressed as "frequent" so it may be worth opening an RFE for that.
I am by no means a python expert, but if you would like to see some code from my use case let me know.
-Dallas
20 Feb 2020 09:35 AM
Hello Dallas,
ah ok, now is clear your use case.
However, is a good idea to open an RFE! I will do it.
To increase my knowledge it might be useful to see other types of work in Python, so if you agree I gladly accept to see some of your code.
Thanks!
Roberto