• Forums
    • Public Forums
      • Community Connect
      • Dynatrace
        • Dynatrace Open Q&A
      • Application Monitoring & UEM
        • AppMon & UEM Open Q&A
      • Network Application Monitoring
        • NAM Open Q&A
  • Home /
  • Public Forums /
  • Dynatrace /
  • Dynatrace Open Q&A /
avatar image
Question by Irakli N. · Jul 01, 2020 at 09:13 AM · Dynatrace Managed alerting

Dynatrace Managed. Query multiple environments for alerts

Hello,

Here is the situation - we have Dynatrace Managed with a number of (in dozens and hundreds) of different monitored environments.

I would like to make an API call to find out if all or subset of these environments (selected from a list) logged the specific type of alert during a specific timeframe.

For example - list all environments experienced 'slow disk' alerts on the specific day with a timestamp of start/stop of the alert.

How can I do the above using a single request?

I know how to query a specific environment for all/specific types of alerts using GET -

/api/v1/events

But as I said - I have hundreds of such environments and it would require to create access token for each environment and query each of them separately. This is not a practical solution.

Any alternatives?

Thanks

Comment

People who like this

0 Show 0
10 |2000000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Viewable by all users

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

2 Replies

  • Sort: 
  • Most voted
  • Newest
  • Oldest
avatar image

Answer by Radoslaw S. · Jul 01, 2020 at 09:46 AM

Hi Irakli - take a look at my example here that I show how I update Frequent Issues Detection settings for many environments using Ansible:

https://github.com/rszulgo/providing-dynatrace-managed-as-a-service/tree/master/update-existing-environment


You cannot do that with a single call, but that's not bad when you automate that - you can call single... script.


Comment
Maciej N.

People who like this

1 Show 2 · Share
10 |2000000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Viewable by all users

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

avatar image Irakli N. · Jul 01, 2020 at 10:09 AM 0
Share

I am kinda surprised that such a feature is not implemented...

Let me try your approach but in one of our clusters we have '2047 Environments' (not a joke) and I can imagine how much time will it take to go thru all of them.

The problem with the script that in it could be 15 from 2000 environments which experience such alert type but unless I query all of them, I won't be able to see which one was...

avatar image Radoslaw S. ♦♦ Irakli N. · Jul 01, 2020 at 10:14 AM 1
Share

It's intentionally not implemented. The way we store separately data per environment, server would need to run the workload of iterating of hundreds or thousands of envs. You rather don't want to overload server with a single query, but rather run smaller chunks and throttle requests if it's too much...


BTW - what I guess you try to do is to implement some custom alerting on top of what Dynatrace does with AI. We work for better customization possibilities in that area - we'll see what next year brings.

Anyway... 2000+ envs it pretty too much, but you probably already know that ;)

avatar image

Answer by Július L. · Jul 01, 2020 at 09:41 AM

There is no such option to query multiple environments. You will have to get Api Token for each one and query them individually.

Luckily, you should be able to automate this using the Cluster API v2. I did not try this yet on my own, but you should be able to create a token management token for each environment and then create the required API token for each environment.

Comment

People who like this

0 Show 5 · Share
10 |2000000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Viewable by all users

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

avatar image Irakli N. · Jul 01, 2020 at 10:12 AM 0
Share

I just looked at cluster API v2. I See


Environments

Manage environments

Migration to multi-datacenter deployment

Migration to multi-datacenter deployment

Remote access

Manage remote access requests

Synthetic - Locations and nodes

Manage synthetic locations and nodes

Tokens

Manage Dynatrace API authentication tokens

User management

Manage user sessions


How above is going to help me? One way or another, I need to create a token for each environment and then using that token query alerts. Nothing has changed, in terms of reducing time to get my answers, right?

Thanks

avatar image Radoslaw S. ♦♦ Irakli N. · Jul 01, 2020 at 10:16 AM 0
Share

Julius and I meant "Tokens" API that can be used to create automatically tokens for each environment. See my github example.

For the specific operation you should look at the Environment's APIs.

avatar image Irakli N. Radoslaw S. ♦♦ · Jul 01, 2020 at 10:30 AM 0
Share

OK, folks, thank you both.

Seems I need to take the path of Ansible/bash scripting way...

avatar image Irakli N. · Jul 01, 2020 at 10:13 AM 0
Share
Sorry, I added my comment in the main thread.
avatar image Radoslaw S. ♦♦ Irakli N. · Jul 01, 2020 at 10:15 AM 0
Share

OK - moved.

How to get started

First steps in the forum
Read Community User Guide
Best practices of using forum

NAM 2019 SP5 is available


Check the RHEL support added in the latest NAM service pack.

Learn more

LIVE WEBINAR

"Performance Clinic - Monitoring as a Self Service with Dynatrace"


JANUARY 15, 3:00 PM GMT / 10:00 AM ET

Register here

Follow this Question

Answers Answers and Comments

30 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How does Alerting, Notifications, and Audit logs work in a managed HA cluster

The restart, shutdown, and other events are also part of the alarm.

Transaction storage limit

Proxy setting on the DT managed cluster prevent internal Environment Problem Notification

Dynatrace Managed and alterting/notification

Forum Tags

mobile monitoring dotnet iis chat kubernetes servicenow amazon web services feedback mysql mainframe application rules rest api cassandra dashboard oneagent sdk cmc application monitoring openkit smartscape request attributes monitoring developer community user tagging log monitoring services ufo activegate auto-detection high five award uem webserver usql iib test automation license ios news migration management zones ibm mq web services notifications sso host monitoring knowledge sharing reports browser monitors java hybris sap vmware maintenance window user action naming javascript appmon ai availability tipstricks automation extensions diagnostic tools session replay permissions search davis assistant auto-update faq documentation problem detection http monitors easytravel apdex network docker tags and metadata cloud foundry google cloud platform synthetic monitoring process groups account usability dynatrace saas gui paas openshift key user actions administration production user actions postgresql synthetic locations upgrade oneagent security Dynatrace Managed user management python technologies mongodb openstack user session monitoring continuous delivery citrix configuration alerting performance monitoring NGINX action naming linux nam installation error reporting database mission control apache mobileapp RUM php azure purepath davis scripting aix nodejs android
  • Forums
  • Public Forums
    • Community Connect
    • Dynatrace
      • Dynatrace Open Q&A
    • Application Monitoring & UEM
      • AppMon & UEM Open Q&A
    • Network Application Monitoring
      • NAM Open Q&A