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:
The following DCI rule utilizes a regular expression to match the incoming name DCI field:
name matches "Northeast.*ATM.*":
The "exclude();" statement is the action used to omit the elements from the discovery.
Note that the comment is not necessary, it is only included in the rule for clarity and documentation.
Multiple rules can be placed in a single file and are processed in a top-down manner:
name matches "northeast-RH.*":
ifType == "frameRelay" and
name matches "Southwest.*":
Wildcards (.*) in match statements can be used within the rule body as variables numbered by the order they appear as in the above example.
There is no include statement, however a rule with no actions can be used to include the elements with no further processing as in the following example:
name matches "router1.*":
# Blank to include with no processing
name matches ".*":
Any elements matching the first statement would be added with no processing, the rest would be excluded.
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.*":
To apply the DCI rule during a scheduled 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
To apply the DCI rule during an interactive discovery, after placing the file on the eHealth server:
1) The DCI rule must be associated to a Discover Policy. You can either create a new policy or modify an existing one and under Properties for the policy, select the DCI rule to associate in the "DCI Rules" list.
2) In the Interactive Discover, select the policy which has the DCI rule assocated to it
3) Discover as usual
*For caveats regarding DCI rule formats, creating them via OneClick and their availability for use in Interactive Discoveries via OneClick, see Using DCI rules with Discovery in eHealth 6.1 and later.
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 on the "Specify DCI rule screen".
For. rapid testing of DCI rule without having to rediscover every time and without updating the eHealth configuration the nhDiscover command can be used with nhConfig as follows:
1) Run a command line discovery:
nhDiscover -c <communityString> -mode lanWan,routerSwitch -res $NH_HOME/tmp/discoverResults.out -o $NH_HOME/tmp/discover.dci <IpAddress>
a) The -res argument provides the discoverResults.log output format
b) The -o argument provides the DCI file
2) You can use nhConfig with the dci file to get a 'post-merge' DCI file to see what the DCI file looks like after the merge:
nhConfig -dciIn %NH_HOME%\tmp\discover.dci -verify -dciOut $NH_HOME/tmp/postMerge.dci
The -verify flag prevents the updates to the eHealth configuration for verification purposes.
For additional information outlining DCI and DCI rules, see the eHealth Integration Guide. .
Keeping your discoveries under control with DCI rules - 6.1 and later
How to use DCI rules
Getting started with DCI rules
eHealth 6.1 and later
Note: Please see the eHealth integration guide for the regular expression patterns supported by DCI rules as they are not the full extended set of regular expressions.
(Legacy KB ID CNC TS34851 )