cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Looking to upgrade from Dynatrace Managed to SaaS? See how

Raise a problem when license consumption is close to limit

deni
Advisor

Hi,

We are using a Dynatrace Managed environment and would like to automatically raise a problem when license consumption (for example, DDUs) is close to being exhausted.

I checked the available metrics but couldn’t find anything like ddu.used or hostunits.used. I did see some metrics such as billing.ddu.log.total, but for DDUs there are also metrics and traces that need to be considered in the calculation, not just logs.

  • Is there a way to monitor the overall license consumption across all DDU categories?

  • Can we set up alerting or problem generation for approaching license limits in Dynatrace Managed?

  • If there are no direct metrics, what would be the recommended approach to achieve this?

Any advice or best practices would be greatly appreciated.

 

Regards, Deni

Dynatrace Integration Engineer at CodeAttest
5 REPLIES 5

AntonPineiro
DynaMight Guru
DynaMight Guru

Hi,

Managed is more limited about that.

For DDU categories, you can try this dashboard.

I do not know any way to alert automatically in Managed about that. I would say review before dashboard to checking trend, and compare to limit your license has.-

Best regards

❤️ Emacs ❤️ Vim ❤️ Bash ❤️ Perl

Julius_Loman
DynaMight Legend
DynaMight Legend

For these purposes we developed an Extension 2.0 which creates metrics per Dynatrace environment and you can then alert using Metric events. It scrapes the Cluster API and writes metrics. 

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

@Julius_LomanThanks for the reply!

If I understand correct you suggest to create a custom extension which calls API to collect the license information and the sent a custom event via v2/events/ingest?

I searched in the swagger but can't find API to get licenses - I see only v1/config/clusterid  and v1/clusterversion nothing more in v1, v2 and config APIs connected to cluster or license.

Dynatrace Integration Engineer at CodeAttest

@deni  - https://docs.dynatrace.com/managed/shortlink/api-cluster-environments-list-existing
This includes consumption data (Classic licensing per environment).

Mark's answer is also valid if you need it for a single environment. We had a requirement to alert on DDU consumption for two environments together, which is not possible with metrics just from a single environment.

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

mark_bley
Dynatrace Champion
Dynatrace Champion

In managed you should know from your license the amount of DDUs you have (i.e. a fixed number)

What you can do is have a metric event to alert on this, but keep in mind this will be per environment.

((builtin:billing.ddu.metrics.total:splitBy():sum:default(0):fold(sum))
+
(builtin:billing.ddu.log.total:splitBy():sum:default(0):fold(sum))
+
(builtin:billing.ddu.serverless.total:splitBy():sum:default(0):fold(sum))
+
(builtin:billing.ddu.events.total:splitBy():sum:default(0):fold(sum))
+
(builtin:billing.ddu.traces.total:splitBy():sum:default(0):fold(sum)))

 That will give you the total amount used.

Let's say your total available is 1M, so put as a static threshold in the metric event with something like 800k.

 

With an extension, script or synthetic-test you could extract this information for the whole cluster from this API https://docs.dynatrace.com/managed/shortlink/api-cluster-get-license-consumption

 

Also maybe something to have a look at are DDU pools, where you can assign a specific env a limit of DDUs allowed to be consumed. https://docs.dynatrace.com/docs/shortlink/davis-data-units#ddu-pools

 

Featured Posts