Previous 7 Templates Next

7.6 Threshold templates

Defining threshold templates facilitates the easy creation of thresholds through a simple interface later, or even in some cases the system can create the thresholds automatically based on a template. The editing of threshold templates is in many respects similar to that of thresholds, for example they contain similar fields, such as E-mail, Mobile notification, SNMP Trap, etc.

 

You can begin the threshold template configuration in three ways:

·       [add new]: start a new threshold template from scratch

·       [from threshold]: use an existing threshold as a sample and populate the template using that threshold

·       [copy]: use an existing threshold template by copying its content into a new template (click on the [copy] link in its row)

It is recommended to use the second mode, because in this way the template will get the same expression as the threshold and unlike the threshold configuration page, the threshold template configuration page do not have any aiding fields for defining the threshold expression.

 

Some of the parameters are the same as the ones for the thresholds, but there are also some differences. The Level parameter is only mandatory if the template is configured to automatically create thresholds, otherwise it can be left empty, in which case the user will be able to create several thresholds with different levels in just one step.

 

A template can be configured to create automatically thresholds. In such a case a site must be configured and PVSR will create thresholds automatically below that site. Optionally four filters can also be defined: what should the name of the equipment match and what it should not match and what should the name of the measurement match and what is should not match. By default the special filter characters can be used (*, ?, % and _) but the system supports regular expressions as well. In that case the parameter value must be in the format REGLIKE=XXX where XXX is the regular expression to be used.

 

The main differences is at the Expression parameter. There are no additional helper fields for the editing of the Expression like there are for regular thresholds, since the expression does not contain concrete measurements but measurement type variables instead. The structure of the expression is very similar to that of it for thresholds, with the following two major differences:

·       For thresholds the strings of the form DBID<F or H or C or O><number><optional .IN or .OUT> represent one measurement. For threshold templates the expression contains strings of the form VAR<variable index>.<F or H or C or O><optional .IN or .OUT>. The variable index can be any integer, but numbers starting from 1 is recommended. The next part identifies the type of the measurement: F for traffic, H for error, C for CarrierUpDown and O for other measurements. For the latter, the identifier of the measurement definition must also be specified right after the letter O.

·       Instead of concrete numbers the INPUT[number] or the AVGDEV[number] string can also be used, except for automatically created thresholds. In the first case, when creating a threshold the system offers a text field for the user to enter the static values. In the second case, it displays the dynamic value input fields, which are shown in the editing of thresholds. It is important to note, that one such INPUT or AVGDEV string should be used per variable. For example, if one would like to use the same condition value both for the in and out part of a traffic measurement, then INPUT1 can be used for both expressions. However, if the template contains another traffic measurement variable, then only INPUT2 should be used there.

 

There is an additional parameter for the thresholds, the “Threshold name” parameter. This should contain the expression that describes the name of the individual thresholds that will be created. The expression can also contain several macros:

o   <equip[number]>: the name of the equipment of the measurement that corresponds to the variable with the given number

o   <var[number]>: the name of the measurement that corresponds to the variable with the given number

o   <descr[number]>: the description of the measurement learned during discovery (Name in equipment parameter on the Site and equipment configuration page) that corresponds to the variable with the given number

o   <var_with_ifdescr[number]>: the name of the measurement that corresponds to the variable with the given number plus the Cisco specific interface description or the ifAlias if there is such a description and PVSR does not use the Cisco description for naming the interfaces (this is the default)

o   <input[number]>: the value of the INPUT with the given number

o   <avgdev[number]>: the description of the value of the AVGDEV with the given number

o   <level>: the level of the threshold

 

Examples for the Expression:

·       The in or out traffic of the interface is larger than the specified value once in a single measurement:

#VAR1.F.IN > INPUT1 or VAR1.F.OUT > INPUT1#1#1#

or

#VAR1.F.IN > INPUT1#1#1# or #VAR1.F.OUT > INPUT1#1#1#

·       The out or error traffic of the interface is larger than the specified value three consecutive times:

#VAR1.F.OUT > INPUT1 or VAR2.H.OUT > INPUT2#3#3#

or

#VAR1.F.OUT > INPUT1#3#3# or #VAR2.H.OUT > INPUT2#3#3#

·       The Jaga agent availability measurement is less than or equal to 90% three times out of five samples: the measurement type is AVAIL, the “a >= 0” condition is used to avoid alarms where the measurement was unsuccessful

#VAR1.OAVAIL <= 90 and VAR1.OAVAIL >= 0#3#5#

 

Examples for the Threshold name (matching the above Expression examples):

·       <equip1> <var1> > <input1>. This can yield for example “Router FastEthernet0 > 1000000” for a concrete threshold

·       <equip1> <var1> > <input1> or <var2> error > <input2>. Since in this case the user has to specify the name of the interface as well, and there can be no more results for both of the variables (see Creating thresholds from templates), therefore specifying <equip2> in the name is unnecessary.

·       <var1> <= 90% <level>. The inclusion of the equipment name is unnecessary in this case because for Jaga availability measurements the name of the measurement contains all required information.

 

The main function of the threshold template page is the management of the templates, but it also contains information about and allows the management of the thresholds that were created based on these templates:

·       The template list also shows the number of thresholds in the system that were created based on the given template. The number of thresholds is also a link which shows a page listing all those thresholds.

·       With the help of the [del insts] link all thresholds based on this template can be deleted together

·       When deleting threshold templates the system first checks if there are existing thresholds based on this template and offers the user the deletion of those as well

·       If one of the parameters of the template is modified, except the threshold expression, then the system asks the user if the changes should be propagated to all thresholds that were created based this template. The new value always overwrites the old one, even if the user did not use the parameters of the template for the creation of the threshold, or if the threshold was later modified manually. The threshold expression is not changed in this case, for that the re-create link has to be used (see next point)

·       If the threshold template is automatically applied then we can re-create the thresholds created using this template. The user can select those parameters which should be overwritten in this mode, but the expression will always be chosen.