User-defined metrics in DMI data views

By default, the standard DMI data views provide a wide range of metrics. To calculate additional statistics, you can define your own DMI metrics for a particular data view.

The data for DMI data views can come from a database or from cache, but user-defined metrics can be added only to data views that use a database as a source for displaying the data. Those data views have the addCalculatedColumn value set to true.

CVENT.ClientView.addCalculatedColumn=true

To define your own metric, create a new dmi_dataview-*.properties file in the config directory of your NAM Server or ADS installation. The default path is:<install_dir>\config\.

Caution

Do not add new metrics to any of the default dmi_dataview-*.properties files. They are overwritten during a report server upgrade.

Before adding a new metric definition, determine the application ID (for example, the CAS ID), the data view ID, and the IDs of all metrics that are used to define the new metric. The metric IDs can the data view help, you access by clicking learn dimension and metric definitions in the Data input for section screen for in DMI.

The format of a definition entry is:

[applId].[viewId].calculatedColumn.[i].[property]=

where:

  • applId is an application ID

  • viewId is a data view ID

  • i is the metric position in the *.properties file, starting from 0 (zero)

  • property is a metric property. Available properties are:

    • id (required) is the metric ID. Use unique IDs in the data view.

    • name (required) is the name of the new metric.

    • description (optional) is a description of the metric.

    • resultType (required) specifies what type is passed to Java from the SQL query result. If left blank, the FLOAT type will be selected.

    • expression (required) is the metric definition. You can use any SQL expressions. Enclose the base metric IDs in square brackets ([ ]).

    • renderer (required) is one of the existing renderer types. If left blank, the STRING type will be assigned.

    • resolutions (optional) specifies the resolutions in which the metric will be added to data view.

    • group (optional) is the group of metrics in which the new metric will be placed.

Note that after creating new metric definitions, it is not necessary to restart the report server. Your metrics are available just after refreshing the Data Mining Interface screen.

Application IDs and data view IDs

For all NAM Server data views, the application ID is CVENT. For ADS data views, the application ID is HTTPLOG (for HTTP analysis data views) or HTTPCOMP (for HTTP hit-level analysis data views). Data view IDs, as well as all data views to which you can add your own metrics, are listed in the following tables.

NAM Server data views that can be extended with user-defined metrics:

Data view name Date view ID
Software Services, Operations and Sites data baselines Rolling
Synthetic and Sequence Transactions baselines CharcTrans
Citrix/WTS Hardware data Citrix
Internetwork Traffic data CvNetwork
Low significance traffic WholeTraff
Network Link data TfcOnLink
Software Services, Operations and Sites data ClientView
Applications, Transactions and Tiers data Tier
Synthetic and Sequence Transactions data Trans
Syntheric Backbone test data GomezSyntheticTest
Synthetic Backbone page data GomezSyntheticStep

Note that RUM Browser data views cannot be extended with user-defined metrics.

Renderer types

The renderer types refer to metric units. You can specify whether your metric is calculated, for example, in bytes or in transactions per second.

The list of available renderer types includes:

  • BPS - bytes per second

  • BYTES - bytes

  • DATE - date

  • DOUBLE - real number without unit

  • INT - integer without unit

  • IP - IP address

  • OPS - operation per seconds

  • PACKETS - packets

  • PACKET_SIZE - packet size

  • PERC - percentage

  • PERIOD_MS - period in milliseconds

  • PPS - packets per second

  • STRING - string of characters

  • TIME - time (except day)

  • TPM - transactions per minute

  • TPS - transactions per second

Result types

The result types define how the metric value is presented on the screen.

Available result types include:

  • BOOLEAN - one of two values (true or false)

  • DATE - date

  • DOUBLE - real number (8 bytes)

  • FLOAT - real number (4 bytes)

  • INT - integer

  • STRING - string of characters

Resolution mnemonics

You can define the following resolutions for your metric:

  • r - one period

  • 1 - one hour

  • 6 - six hours

  • w - one week

  • m - one month

Example metric definitions

In this example, two new metrics are being added to the Monitored traffic data view. To do this, create a new file in the C:\<install_dir>\config\ directory. In this example, the name of this file is dmi_dataview-my_metrics.properties.

The first metric presents a sum of “SMTP command syntax” errors and “SMTP general system” errors:

CVENT.ClientView.calculatedColumn.0.id=metricExample1
CVENT.ClientView.calculatedColumn.0.name=SMTP syntax and system errors
CVENT.ClientView.calculatedColumn.0.description=A sum of "SMTP command syntax" errors and "SMTP general system" errors
CVENT.ClientView.calculatedColumn.0.resultType=INT
CVENT.ClientView.calculatedColumn.0.expression=[SmtpAuthErr] + [SmtpSvrErr]
CVENT.ClientView.calculatedColumn.0.renderer=INT
CVENT.ClientView.calculatedColumn.0.resolutions=r,1,6,d,w,m
CVENT.ClientView.calculatedColumn.0.group=

The second metric presents the percentage of successful hits:

CVENT.ClientView.calculatedColumn.1.id=metricExample2
CVENT.ClientView.calculatedColumn.1.name=Percentage of successful hits
CVENT.ClientView.calculatedColumn.1.description=A percentage of successful hits
CVENT.ClientView.calculatedColumn.1.resultType=FLOAT
CVENT.ClientView.calculatedColumn.1.expression=case when [hits] = 0 then null else 100.0*[SH]/[hits] end
CVENT.ClientView.calculatedColumn.1.renderer=PERC
CVENT.ClientView.calculatedColumn.1.resolutions=r,1,6,d,w,m
CVENT.ClientView.calculatedColumn.1.group=

Next, one new metric is added to the Transactions (RTMS) data view. To do this, create a new file in the <install_dir>\config\ directory. In this example, the name of this file is dmi_dataview-my_ADS_metrics.properties.

The new metric presents a double value of the transaction time:

HTTPLOG.TransDataRtms.calculatedColumn.0.id=metricExample3
HTTPLOG.TransDataRtms.calculatedColumn.0.name=Double transaction time
HTTPLOG.TransDataRtms.calculatedColumn.0.description=Double transaction time
HTTPLOG.TransDataRtms.calculatedColumn.0.resultType=float
HTTPLOG.TransDataRtms.calculatedColumn.0.expression=2*[transTime]
HTTPLOG.TransDataRtms.calculatedColumn.0.renderer=PERIOD_MS
HTTPLOG.TransDataRtms.calculatedColumn.0.resolutions=r,1,6,d,w,m
HTTPLOG.TransDataRtms.calculatedColumn.0.group=User-defined metrics