vRealize
Operations Manager includes functions that you can use in super
metric formulas. The functions are either looping functions or single
functions.
Looping
Functions
Looping functions work on more
than one value.
Looping
Functions


avg

Average of the collected values.

combine

Combines all of the values of the metrics of
the included objects in a single metric timeline.

count

Number of values collected.

max

Maximum value of the collected values.

min

Minimum value of the collected values.

sum

Total of the collected values.

Looping Function
Arguments
The looping function returns
an attribute or metric value for an object or object type. An attribute is
metadata that describes the metric for the adapter to collect from the object.
A metric is an instance of an attribute. The argument syntax defines the
desired result.
For example, CPU usage is an
attribute of a virtual machine object. If a virtual machine has multiple CPUs,
the CPU usage for each CPU is a metric instance. If a virtual machine has one
CPU, then the function for the attribute or the metric return the same result.
Looping Function
Formats


funct(${this, metric
=ab:optional_instancec})

Returns a single data point of a particular
metric for the object to which the super metric is assigned. This super metric
does not take values from the children or parents of the object.

funct(${this,
attribute=ab:optional_instancec})

Returns a set of data points for attributes
of the object to which the super metric is assigned. This super metric does not
take values from the child or parent of the object.

funct(${adapterkind=adaptkind,
resourcekind=reskind,
resourcename=resname,
identifiers={id1=val1id2=val2,…},
metric=ab:instancec})

Returns a single data point of a particular
metric for the
resname specified in
the argument. This super metric does not take values from the children or
parents of the object.

funct(${adapterkind=adaptkind,
resourcekind=reskind,
resourcename=resname,
identifiers={id1=val1,
id2=val2,…}, attribute=ab:optional_instancec})

Returns a set of data points. This function
iterates attributes of the
resname specified in
the argument. This super metric does not take values from the child or parent
of the object.

funct(${adapterkind=adaptkind,
resourcekind=reskind, depth=dep}, metric=ab:optional_instancec})

Returns a set of data points. This function
iterates metrics of the
reskind specified in
the argument. This super metric takes values from the child (depth > 0) or
parent (depth < 0) objects, where
depth describes the
object location in the relationship chain.
For example, a typical
relationship chain includes a datacenter, cluster, host, and virtual machines
with the datacenter at the top and the virtual machines at the bottom. If the
super metric is assigned to the cluster and the function definition includes
depth = 2, the super metric takes values from the virtual machines. If the
function definition include depth = 1, the super metric takes values from the
datacenter.

funct(${adapterkind=adaptkind,
resourcekind=reskind, depth=dep},
attribute=ab:optional_instancec})

Returns a set of data points. This function
iterates attributes of the
reskind specified in
the argument. This super metric takes values from the child (depth > 0) or
parent (depth < 0) objects.

For example,
avg(${adapterkind=VMWARE,
resourcekind=VirtualMachine, attribute=cpuusage_average, depth=1})
averages the value of all metric instances with the cpuusage_average attribute
for all objects of type VirtualMachine that the vCenter adapter finds.
vRealize
Operations Manager searches for objects one level below the object type
where you assign the super metric.
Single
Functions
Single functions work on only
a single value or a single pair of values.
Single
Functions



abs

abs(x)

Absolute value of x. x can be any floating
point number.

acos

acos(x)

Arccosine of x.

asin

asin(x)

Arcsine of x.

atan

atan(x)

Arctangent of x.

ceil

ceil(x)

The smallest integer that is greater than or
equal to x.

cos

cos(x)

Cosine of x.

cosh

cosh(x)

Hyperbolic cosine of x.

exp

exp(x)

e raised to the power of x.

floor

floor(x)

The largest integer that is less than or
equal to x.

log

log(x)

Natural logarithm (base
x) of x.

log10

log10(x)

Common logarithm (base 10) of x.

pow

pow(x,y)

Raises x to the y power.

rand

rand(x:y)

Generates a random number between x and y.

sin

sin(x)

Sine of x.

sinh

sinh(x)

Hyperbolic sine of x.

sqrt

sqrt(x)

Square root of x.

tan

tan(x)

Tangent of x.

tanh

tanh(x)

Hyperbolic tangent of x.
