• 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 /
  • Application Monitoring & UEM /
  • AppMon & UEM Open Q&A /
avatar image
Question by James M. · Sep 10, 2013 at 09:46 PM ·

dynamic measures, custom plug-ins, and how to graph individual values

I'm updating the Db Query plug-in (from the fastpacks/plug-ins area) to accept a list of arbitrary database column names, instead of a single metric called 'Column Value'. My understanding is that to do this involves creating dynamic measures. However, after building out the changes and generating the new dynamic measures, the dynatrace dashboarding capabilities don't do what I would have expected. Support suggested we utilize the forums.The image below is what the dynamic measure matrix is displaying. In this dynamic measure case, we know what the columns will actually be for the specified queries.

Here are my questions. How do you create charts to display the collected values over a period of time (i.e. samples, max_packages_per_minute)? And for the dynamic measure matrix, I thought that the values where supposed to be represented as columns. I have 4 different queries, each with the same columns, and we'd expected that we'd have gotten a grid of values.

The code that builds out the dynamic measures is below:

if ((measures = env.getMonitorMeasures(METRIC_GROUP, MSR_VALUE)) != null) {
	double cValues[] = cValue();
	String measureNames[] = getMeasureNames();
	if (cValues != null) {
		for (MonitorMeasure measure : measures) {
			measure.setValue(cValues[0]);
			int i = 0;
			for (String measureName : measureNames) {
				if (measureName != null && measureName.trim().length() > 0) {
					log.finer("Setting dynamic measure " + measureNames[i] + " with value "+ cValues[i]);
					dynamicMeasure = env.createDynamicMeasure(measure, "Name", measureNames[i]);
						dynamicMeasure.setValue(cValues[i]);
				}
				i++;
			}
		}
	}
}
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.

11 Replies

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

Answer by Andreas G. · Sep 11, 2013 at 02:14 PM

Hi James. I forwarded your question to an internal resource who created several monitoring plugins in the past. He will have a look at this and will respond later this week. Andi

Comment

People who like this

0 Show 0 · 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

Answer by Eugene T. · Sep 11, 2013 at 03:06 PM

Hi Jim,

For each of the four queries, please use unique name in the second parameter of the com.dynatrace.diagnostics.pdk.MonitorEnvironment.createDynamicMeasure method, e.g. instead of "Name" use "Query1" for the measures of the first query, "Query2" for the measures of the second query, etc. You should be able to have grid then. Please let Andi or me know if you still have problem.

Eugene. 

Comment

People who like this

0 Show 0 · 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

Answer by James M. · Sep 11, 2013 at 05:14 PM

 

Thanks, Eugene. I added in that new field to the plugin, and that makes the dynamic measure matrix dashlet work as expected.

The last two questions, which are still outstanding, include:

1) how do I graph the dynamic values, so we can see how these column values change over time?

2) How can I create a measure that is specific to the monitor instance and dynamic value (i.e. column name) and then put thresholds on that value. Our ultimate goal is to associate incidents against those new measures.

Comment

People who like this

0 Show 1 · 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 Lopes D. · Sep 11, 2013 at 06:53 PM 0
Share

Number one should be simple, since each dynamic measure group (second argument on the createDynamicMeasure method) is considered a "split" for the "father" measure when you create a chart, you can select that split and then select the dynamic measures you want.

 

avatar image

Answer by Eugene T. · Sep 11, 2013 at 05:45 PM


Hi Jim,

This is doable. I'll update wiki page with steps to follow later today or early tomorrow.

Eugene.

Comment

People who like this

0 Show 0 · 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

Answer by James M. · Sep 11, 2013 at 07:37 PM

Ah, I missed the splitting drop-down; I only noticed the usual 'split' cast of characters. Thanks, David!

Comment

People who like this

0 Show 1 · 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 Michael B. · Sep 11, 2013 at 07:43 PM 0
Share

Would you mind sharing your modified db plugin?  I was just about to update the existing one to add this functionality.

avatar image

Answer by Eugene T. · Sep 11, 2013 at 07:45 PM

Great! David, thank you for providing steps for Jim.

Comment

People who like this

0 Show 0 · 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

Answer by James M. · Sep 11, 2013 at 07:52 PM

 

Yes, let me do some more testing and I'll pass the JAR file back off to you.

Comment

People who like this

0 Show 0 · 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

Answer by James M. · Sep 12, 2013 at 03:00 PM

I'm still a bit confused on how to set thresholds on one of these child measures. In our specific use case, he Db Query is create a dynamic measure called Db Query->Column Value->Approvals->Max Packages. Approvals is the query, Max Packages is the column name we're monitoring.

I'd like to create a measure on this value and ultimately alert when the value breaks our thresholds.

Many I'm missing something, but the UI seems to stop at the 'Column Value' dimension, so I can't figure out how to do the above Any pointers to doc I may have missed? Thanks in advance,Jim

Comment

People who like this

0 Show 1 · 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 Eugene T. · Sep 12, 2013 at 04:30 PM 0
Share

Hi Jim,

I'm not sure if you can setup incidents based on the dynamic measures. I'll double check it. However, when incident is triggered you will know which dynamic measure triggered it, i.e. the ${ VIOLATED_MEASURE_SPLITTINGS} will have a dynamic measure name and ${ VIOLATED_MEASURE_VALUE} will have its value. If this doesn't work for you, the Monitor Metric Group plugins should work. We can take use of Monitor Metric Group plugins offline if you'd like to use them.

Eugene.

avatar image

Answer by James M. · Sep 12, 2013 at 06:04 PM

Let me take a look at that.

One, hopefully last question that I can't find in the PDK javadoc. How do I get the profile name associated with the monitor? I'd like to log it along with the other data, so if there are issues there is the option of scraping the log and generating alerts from that to the group that owns the profile.

Comment

People who like this

0 Show 0 · 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

Answer by Eugene T. · Sep 13, 2013 at 09:44 PM

Hi Jim,

We've received confirmation from the Lab that a dynamic measure cannot be used to configure an incident rule, only measure subscriptions stored in the system profile can be used for incident rule configurations.

In terms of the profile name: the com.dynatrace.diagnostics.pdk.ActionEnvironment.getSystemProfileName() method returns profile name.

Eugene.

 

Comment

People who like this

0 Show 0 · 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.

  • 1
  • 2
  • ›

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

No one has followed this question yet.

Forum Tags

dotnet mobile monitoring load iis 6.5 kubernetes mainframe rest api dashboard framework 7.0 appmon 7 health monitoring adk log monitoring services auto-detection uem webserver test automation license web performance monitoring ios nam probe collector migration mq web services knowledge sharing reports window java hybris javascript appmon sensors good to know extensions search 6.3+ server documentation easytravel web dashboard kibana system profile purelytics docker splunk 6.1 process groups account 7.2 rest dynatrace saas spa guardian appmon administration production user actions postgresql upgrade oneagent measures security Dynatrace Managed transactionflow technologies diagnostics user session monitoring unique users continuous delivery sharing configuration alerting NGINX splitting business transaction client 6.3 installation database scheduler apache mobileapp RUM php dashlet azure purepath agent 7.1 appmonsaas messagebroker nodejs 6.2 android sensor performance warehouse
  • 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