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

ActiveGate plugin Python - how to add dynamic metrics to plugin.json?

jayanth_muppane
Newcomer

In plugin.json of ActiveGate plugin, we provide metadata of metrics. What if metrics are dynamic and we don't know what our URL returns. How do we supply metrics to the plugin.json then?

 

4 REPLIES 4

Piotr_Meller
Dynatrace Helper
Dynatrace Helper

Dear Jayanth

Currently there is no out of the box support for such dynamic metrics.

Although we can imagine plugin.json generator based on data returned by your URL and automatically sending it to Dynatrace server. Due to some limitations regarding metric definition changes previous plugin should be deleted before sending the new one. That would lead to some data gaps but if metrics do not change very often that could work.


Regards,

Peter


Don't we have something like the below which is there in Java SDK which we've used for Appmon ?MonitorMeasure com.dynatrace.diagnostics.pdk.MonitorEnvironment.createDynamicMeasure(MonitorMeasure arg0, String arg1, String arg2).


ex:

final MonitorMeasure dynamiccompletedCountMeasure = env.createDynamicMeasure(completedCountMeasure, "Platform Name", name);

dynamiccompletedCountMeasure.setValue(completedCount);


No, metrics have to be defined in the plugin configuration file. See my approach below that hight work for you.


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

Julius_Loman
DynaMight Legend
DynaMight Legend

I haven't tried from a plugin, but maybe you could register the custom metric dynamically using the Environment API and send the metrics:


https://www.dynatrace.com/support/help/extend-dynatrace/dynatrace-api/environment-api/metric-v1/cust...

I'm not sure if the plugin would stop you when trying to send data for metric keys that are not defined in the JSON. If it does, then you would just push the dynamic data using the Environment API and push the "statically" defined metrics using the plugin.


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

Featured Posts