Hi there,
I try to measure the heap size after a GC is done. The idea was to use the data that dynatrace is collecting about the heapsize and correlate these with the timestamp of the GC.
I learned that I can geht the data of dynatrace via REST as a Report.
Now the question is:
Is it possible to put the correlated data back in dynatrace (via REST API) and view them in a dashboard?
I am thankful for every hint or advise.
Greetings
Simon
Answer by Kristof R. ·
Hi Simon,
You could write a monitoring plugin that allows you to import data into Dynatrace again.
For more information you can check the online documentation on plugins: https://community.dynatrace.com/community/display/...
This would not work via REST however. The plugin would go and fetch the data and load it as measures back into Dynatrace.
Hope this helps.
KR, Kristof
Answer by Simon H. ·
Hey,
would it be possible to retrieve the data via rest and after correlation save them in DT again within the same Monitor-Plugin?
Hi Simon,
That technically would be possible.
The plugin would both be responsible of fetching the data, doing the correlation, and giving data points back in the form of measures.
KR, Kristof
Answer by Simon H. ·
Hi again, I tried this and I am now able to get the data via REST and have them now ready to put back.
I try to figure out now how I set the measures in my monitor-plugin per Agent?
Via "environment.setValue(123)" I can set the value of a measure and put them in a List of measures. Fine so far.
Example:
Agent A has the values 1, 2 and 3.
Agent B has the values 4, 5 and 6.
Do I have to create a seperate Metric for each Agent or can this be done differently (more elegant)?
I may have found the answer here :-)
Answer by Simon H. ·
Hey, I did it. The data is finally chartable in dynatrace.
Now I face a new Problem. Dynatrace sets a defaultvalue of -1 for a dynamicMeasure which is not providet with a ".setValue(double)". because of that i get a chart like this:
Is it possible, to avoid the default value of -1? I am thinking of not creating a measurement so that the drawn line stays at the last value withozt making those ups and downs if there is no measurement.
Answer by David M. ·
Hi Simon,
Maybe I don't fully understand what you are trying to do but there are some measures you can create that track the number of activations for different types of garbage collectors. Check out the measures "Total GC Activations" and "Specific GC Activations".
HTH,
David
Hey David,
yeah i knwo about this measures. I use them to find the timestamps of the GC. Then I loog at the memory size at the same timestamp and create a measure with this new value. Becaus there is (in ideal situations) not at every timestamp a GC there is not a value for memory size at every timestamp. (you can see both in my picture of the previous posts)
The Problem here is, that dynatrace sets a default value of -1 if you create a measure but dont set a value. Thats why there are ups and downs.
I would like to have a straight line from one measure point to the other.
So I thought of two possibilities:
- only create a measure if there is a value instead of creating a measure and not setting a value. Problem: if the machine does no GC, I dont get any measures and I can't create a dashboard(it is empty at the beginning)
or
- try to safe the last value and if there is no new value after a GC set the old one. Problem here is: how to do that? Is there a way to keep values within a javaclass of the monitor?
Any ideas on that?
JANUARY 15, 3:00 PM GMT / 10:00 AM ET