# Comparison modes overview

A comparison mode describes how a metric value should be compared against a threshold value. There are three modes to choose from: single, absolute, and relative.

In single mode, threshold conditions are compared to a metric value from the last monitoring interval. This is the default and is sufficient for most purposes.

In some cases, however, you may be interested in an abnormal change of a certain metric value between two monitoring intervals. Then you should use either absolute or relative mode. These two modes are similar, but an absolute comparison uses the simple difference between the metric values, while a relative comparison uses the difference expressed as a percentage. Note that while the interpretation of the value threshold condition for these two modes is quite natural, the baseline condition uses a more complex formula to normalize comparison against the baseline.

Single

• If only a value condition is specified, the current value of the metric being monitored is compared with a threshold value specified in this condition.

• If a baseline condition is specified, the current value of the metric is compared with the baseline value multiplied by the baseline multiplier .

A cut-off condition is not available in the single mode.

Absolute

• If no baseline condition is specified, the increments in the measured metric are compared to the value specified in the value condition. That is, if the measured metric assumed the value of A in one monitoring interval and then value B in the next one, the value of B - A will be taken.

• If a baseline condition is specified, the alert calculates a percentage increase in the actual absolute increment of the metric versus absolute baseline increment . This means that for two subsequent monitoring intervals, we measure the absolute increment in the value of the metric and subtract from it an increment calculated from comparing baseline value for the same monitoring intervals:

(B - A) - (baseline_2 - baseline_1)

We then take the resulting value relative to the differences in baselines, that is we divide it by the absolute (positive) value of (baseline_2 - baseline_1) and multiply it by 100%:

(((B - A) - (baseline_2 - baseline_1)) / |baseline_2 - baseline_1|) * 100%

Where the pipe symbol (“|”) denotes extraction of an absolute (that is always positive) value from a number.

The result is compared with the value the user entered in the baseline threshold field.

Relative

• If no baseline condition is specified, the relative increments in the measured metric are compared to the value specified in the threshold field. That is, if the measured metric assumed the value of A in one monitoring interval and then value B in the next one, the value that would be taken is:

*((B - A)/A) * 100% *

• If a baseline condition is specified, the alert calculates a percentage increase in the actual relative increment of the metric versus relative baseline increment . The calculations are similar to those performed for the absolute mode, except that all differences in metric values or in baseline values are relative:

*(B - A)/A * and *(baseline_2 - baseline_1)/baseline_1 *

This gives the following formula:

(((B - A)/A - (baseline_2 - baseline_1)/baseline_1) / |baseline_2 -baseline_1|/baseline_1) * 100%

The result is compared with the value the user entered in the baseline threshold field.