15.1 Understanding Algorithms

An algorithm is a set of rules used to calculate the condition of an element. Sometimes the algorithm is more complex and consists of multiple rules: an initial element set (any elements to consider), the intermediate state of the calculation (such as a filtered set of elements on which to operate), and the result of the calculation (ElementCondition).

Algorithms can be applied to natively defined elements in the Services hierarchy, and for elements of event-based adapters in the Elements hierarchy. They are not available for elements created using object-based adapters, such as NetIQ, OpenView, InterCommunication, and Spectrum.

The following sections describe the default algorithms library as well as custom examples that can be used as-is or further modified:

15.1.1 Default Algorithm Types

By default, the following algorithm types are available:

  • average: Calculates the average condition of all children.

  • bands: Uses a series of thresholds to sets condition based on the percentage of children that are CRITICAL:

    • When 25%-50% of children are CRITICAL, sets element condition to MINOR.

    • When 50%-75% of children are CRITICAL, sets element condition to MAJOR.

    • When 75%-100% of children are CRITICAL, sets element condition to CRITICAL.

    • If less than 25% of children are CRITICAL, sets condition to highest condition occurring in at least 25% of children.

  • bemEndUserBand: Sets condition based on thresholds against response times on BEM end user tests. Values are the same as BEM defaults.

  • bemSyntheticBand: Sets condition based on thresholds for response times on BEM synthetic tests.

  • count: Looks for any condition occurring for at least 50% of children.

  • highest: Takes the highest condition from all children.

  • lowest: Takes the lowest condition from all children.

  • paramCount: Looks for any condition occurring in a specified percentage of children. Specify percentage threshold, default condition, and description.

  • paramSet: Sets the condition. Specify description and resulting condition.

  • paramHighest: Takes the highest condition. Specify default condition, child type, and description.

  • paramBand: Sets two thresholds to test for percentage of children with selected condition. Specify two percentage thresholds, test conditions, and resulting conditions.

  • paramScript: Runs a script. Specify script code or name of script located in /OperationsCenter_install_path/database/scripts.

  • paramReduce: Takes the highest condition of children with matching element property value. Specify invert value, property name, and value.

  • paramElementPropertyBand: Sets condition based on thresholds against selected property value. Specify property name, upper and lower thresholds, description, and resulting condition.

  • paramBemSyntheticBand: A parameter based version of the bemSyntheticBand algorithm. Specify upper and lower thresholds for all condition levels.

  • suppressSensitive: If all children (NAM and ORG) are suppressed, then the element is suppressed. Otherwise, it uses the highest condition.

15.1.2 Custom Algorithm Examples

The algorithm library includes various examples that can be used as is, customized to suit your requirements, or just referred to as you create new algorithms.

For more information about creating new algorithms, see Section 15.4, Modifying the Algorithm Library.

The example algorithms include the following:

  • ciscorouters: Uses a reduction and a regular expression to look at the condition of all children with class cisco and takes the highest condition.

  • hosts: Uses a reduction to look at the condition of all children with class host and calculates the average.

  • invoking: Finds all children and then uses the invoke tag to call the count algorithm.

  • ports: Uses a script fragment to look at the condition of all children with class port and takes the highest condition.

  • splitting: Looks at the condition of all children with class router, uses split and branch tags to check to see the percentage of CRITICAL children, then uses band tags to set the condition.