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

Creating DMI User-defined Metrics (Custom Metrics) and ISP Mode Limitations

raffaele_talari
Inactive

Hi,

I'd like to share my knowledge about the User-defined metrics, I believe could be useful to everyone's approaching the custom created metrics.

You can find the official knowledge about the User-defined metrics on the Doc here:

https://community.dynatrace.com/community/display/...

But I'd like to share some tips and provide further examples, in addition to the ones on the page.

Tips:

- The ID should be less than 20 characters. (But it works anyway, you'll just see a warning on the server.log)

- Don't split the description on more lines

- Always use the case when - then else statement with the zero-check condition to avoid incurring into SQL division by zero errors showed in the report.. (it's not that pretty 🙂 )

- Create your own group and don't leave it blank, otherwise the metrics will be shown in the Other group

- If you're quite sure that you're metric is correctly written double check the server.log..you'll be amazed of what you can learn from that log. 🙂

The following examples are created to be used in a DMI custom report on the Software service, operation, and site data view.

As you can see, I'm showing three common cases: a rate, a percentage and a bytes calculation.

CVENT.ClientView.calculatedColumn.0.id=RAF_CustomMetric1
CVENT.ClientView.calculatedColumn.0.name=MyAwesomeMetricName
CVENT.ClientView.calculatedColumn.0.description=My awesome metric description. In this case the rate of incomplete responses on the total of operations
CVENT.ClientView.calculatedColumn.0.resultType=DOUBLE
CVENT.ClientView.calculatedColumn.0.expression= case when [trans] = 0 then 0 else [RejTrans] / [trans] endCVENT.ClientView.calculatedColumn.0.renderer=DOUBLE
CVENT.ClientView.calculatedColumn.0.resolutions=r,1,6,d,w,m
CVENT.ClientView.calculatedColumn.0.group=MyAwesomeMetricGroup
CVENT.ClientView.calculatedColumn.1.id=RAF_CustomMetric2
CVENT.ClientView.calculatedColumn.1.description=My awesome metric description. In this case the average of bytes transferred per operation
CVENT.ClientView.calculatedColumn.1.resultType=DOUBLE
CVENT.ClientView.calculatedColumn.1.expression= case when [trans] = 0 then 0 else [c_sByte] / [trans] end
CVENT.ClientView.calculatedColumn.1.renderer=BYTES
CVENT.ClientView.calculatedColumn.1.resolutions=r,1,6,d,w,m
CVENT.ClientView.calculatedColumn.1.group=MyAwesomeMetricGroup
CVENT.ClientView.calculatedColumn.2.id=RAF_CustomMetric3
CVENT.ClientView.calculatedColumn.2.description=My awesome metric description. In this case the percentage of Zero window size events compared to the number of TCP packets sent by the servers
CVENT.ClientView.calculatedColumn.2.resultType=DOUBLE
CVENT.ClientView.calculatedColumn.2.expression=case when [SPTCP] = 0 then 0 else [ZWS] / [SPTCP] * 100 end
CVENT.ClientView.calculatedColumn.2.renderer=PERC
CVENT.ClientView.calculatedColumn.2.resolutions=r,1,6,d,w,m
CVENT.ClientView.calculatedColumn.2.group=MyAwesomeMetricGroup

But when it comes to the ISP Mode..everything changes..

Check your CAS Configuration:

CAS->Settings->Central Analysis Server-> Server Configuration

If you're in ISP Mode you can't use any combination of the following dimensions and user-related metrics to create a custom one:

Dimensions


  • Citrix server
  • Client IP address
  • Client IP addresses (type)
  • Client VPN
  • Client WINS name
  • Client city
  • Client country
  • Client geographical region
  • Client group
  • Client internal IP address
  • Client name
  • Server port
  • Unique client groups
  • User group
  • User ID

User-related metrics


  • Affected clients (application)
  • Affected clients (availability)
  • Affected clients (network)
  • Affected users (application)
  • Affected users (availability)
  • Affected users (network)
  • Affected users (performance)
  • Percentage of affected clients (application)
  • Percentage of affected clients (availability)
  • Percentage of affected clients (network)
  • Percentage of affected users (application)
  • Percentage of affected users (availability)
  • Percentage of affected users (network)
  • Unique client IP addresses
  • Unique clients
  • Unique internal client IP addresses
  • Unique users

You can check the list and the explanation of the limitation of the ISP Mode here:

https://community.dynatrace.com/community/display/...

Unfortunately you won't be able to know these limitations from the User-defined metrics page..

So, if you're writing any user-defined metric using any of the user-related metrics of the list (in combination with the reported dimensions, obviously) you won't see your created metric and in the server.log you will see something like this:

DMIProperties         Property calculatedColumnForbiddenCols=CliCnt,AffUserNet,AffUserNetCPerc,AffUserAvl,NotAffUserNet,NotAffUserAvl,CliCntC,CliIpCnt,GrCnt set to CVENT.ClientView

So before creating any User-defined metrics involving user-related metrics please check your CAS Configuration!

That's all folks!

Hope it will help.

Ciao,

Raffaele

2 REPLIES 2

kenneth_r_brace
Newcomer

Great page Raff,

Where can I find a list of the metric mnemonics that I can use for defining my own metrics?

Upon more searching I like Chris Vs solution to export a report with the metrics that you wish to use:

https://answers.dynatrace.com/questions/140818/metric-ids-for-idle-and-network-time.html