Keeping your discoveries under control with DCI rules

Document ID : KB000055082
Last Modified Date : 14/02/2018
Show Technical Document Details

Database Configuration Information (DCI) is one of the most powerful API's provided by eHealth for controlling the discovery process. DCI consists of formatted records defining eHealth element configuration information.

DCI records are created by the finder process during device discovery which are then imported by eHealth to create and update the elements in you network. DCI rules are applied to the incoming DCI to change element attributes, perform grouping, or omit elements before the configuration data is saved.

Basic DCI rules consist of a condition statement followed by zero or more actions:

condition :
{ 
    actions;
    actions;
     ...
}

The following DCI rule utilizes a regular expression to match the incoming name DCI field:

name matches "Northeast.*ATM.*":
{
 exclude();
}

The "exclude();" statement is the action used to omit the elements from the discovery. There is no include statement, however a rule with no actions can be used to include the elements with no further processing.

Multiple rules can be placed in a single file and are processed in a top-down manner:

name matches "northeast-RH.*":
{
 setName("NE-Sales-RH-$1");
}
ifType == "frameRelay" and
name matches "Southwest.*":
{
 setGroup("SouthWest_FrameRelay"):
}

Wildcards (.*) in match statements can be used within the rule body as variables numbered by the order they appear as in the above example.

By default, an element is removed from the processing stack once a rule is matched. To have elements continue through to the next rule after a match is made, a "continue();" statement can be used:

name matches "Southwest.*":
{
 setGroup("SouthWest_FrameRelay");
 continue ();
}

To apply the DCI rule during a scheduled or interactive discovery, after placing the file on the eHealth server:

  1. Check the box next to "Use DCI Rules" and click "Specify"

  2. Check the "Use a DCI rules file" radio button and click "Browse"

  3. Locate and select your rules file and click "OK" then "OK" again to return to the main discovery UI.

  4. Discover as usual

    Figure 1

    Alternatively, simple rules can be created in the discover UI by selecting "Create new rule and later recalled if saved by selecting the "Use rule named" and choosing the appropriate rule:

    Figure 2

    For additional information outlining DCI and DCI rules, see the eHealth Integration Guide.