Filtering nodes and CI types for CMDB Sync

Nodes which are created, deleted, or updated are added to the CMDB sync queue. As not all of the discovered data is required in the CMDB, it is filtered to reduce the amount of data synced, and to increase the relevance of that data for CMDB users. Filtering is a two stage process, firstly the root nodes are selected and a filter applied, then, after the data is transformed into the Common Data Model, an additional CMDB CI filter is used to select those CIs to be synced to the CMDB.

 

Filtering in the CMDB Synchronization workflow

Filters defined for CMDB sync are used during several stages of the CMDB synchronization process:

The BMC Helix Discovery filter is applied to the source subgraph that is populated by retrieving all the relevant data from the Discovery datastore. This trims the data to avoid populating CMDB with excessive or unnecessary information.

After that source subgraph is transformed into the Common Data Model (a target subgraph, centered around a target root node), and the second filter is applied to the resulting data.

Filtering the root nodes 

On the Filtering > BMC Discovery pane of the CMDB Sync page, you can create a filter for each BMC Helix Discovery root device node kind (which can select all, none, or nodes matching specific filter conditions) and preview the results when using a candidate node set (ensure that the candidate node set is visible; use Click here to see the current candidate set if necessary).

The defined filter creates the model of the candidate set that is synchronized to the CMDB later on. All device nodes are synchronized unless a filter is applied.

In the filter settings you can specify one of the following options:

  • All nodes of the selected kind are synced to the CMDB 
  • No nodes of the selected kind are synced to the CMDB
  • Only nodes of the selected kind which match the defined conditions are synced to the CMDB

Remove an individual definition by clicking its link then using the Clear selected BMC Discovery filter definition button, or reset all filters using Clear All BMC Discovery filter definitions.

Filtering CMDB CI types 

All device nodes matching the BMC Helix Discovery filter created in Filtering the root node are synchronized to the CMDB, however the CMDB filter enables you to add a second level of filtering on the data once it has been transformed into the Common Data Model. 

On the Filtering > CMDB pane of the CMDB Sync page, you can create a filter for each CI class (which can select all, none, or nodes matching specific filter conditions - see below), and preview the results on the BMC Discovery filter page. All BMC Helix CMDB CI classes are synchronized unless a filter is applied.

In the filter settings for the CI class you can specify one of the following options:

  • All CIs of the specified class are synced to the CMDB 
  • No CIs of the specified class are synced to the CMDB
  • Only CIs of the specified class which match the defined conditions are synced to the CMDB

Remove an individual definition by clicking its link then using the Clear selected CMDB filter definition button, or reset all filter definitions using Clear All CMDB filter definitions

Filter Conditions

You can define conditions in the filtering panes reached from the BMC Discovery or CMDB buttons, for BMC Discovery root nodes, or CMDB CI classes respectively. A filter can be constructed from these conditions, which pushes just the matching root nodes or CIs to the CMDB. Conditions can be defined for simple attribute values, or attributes of a destination node or CI reached by following a relationship, or logical combinations of either. The filters are shown in map form in the filter builder.

Query Constructor

Query constructor contains two areas, where you specify the attributes that will be used in a query, and define the filtering conditions and values to match.

On the first area you can select an attribute to filter on, or follow relationships to other nodes from which you can select attributes to filter on, and define the conditions and  the value upon.


Relationships are displayed with a following right arrow (►). To select the necessary attribute, you can scroll through the list or use the lookup tool beneath each pane.

When you enter text into the lookup tool, a drop down list of matches is displayed, from which you can select the attribute or relationship to use.

Clicking an attribute, for example OS Class, adds a Host: OS Class entry to the filter.

Clicking a relationship, for example Software Instance: Software Instances running on this host, populates the next pane to the right with the attributes and relationships of the related node. When you traverse to more than three relationships, it adds new pane and scrolls the previous panes to the left, hiding the first pane(s). You can scroll back by clicking the arrow to the left of the filter builder.

The second area provides a map of the filter that you are constructing.

You can evaluate conditions on an attribute or group of attributes using the following options:

  • All—True when ALL conditions are true.
  • Any—True when any of the conditions are true.
  • None—True when none of the conditions are true.

Example of creating a root node filter

The following example shows how to use the filter builder to create a filter which will sync only those hosts in the organization that are web servers. In the case, you might want to find all Windows hosts running IIS and all UNIX hosts running Apache. 

  1. Create a filter for all Windows hosts running IIS:
    1. Select Host as an BMC Discovery node kind to filter.
    2. Click the Only Host nodes which match the following conditions... option.
    3. Select OS Class from the list of the node attributes, and define a condition where OS Class contains the word Windows.
    4. Click the Add Condition icon  next to the OS Class filtering condition to arrange a new conditions evaluation container (with All, Any, or None options). 
    5. Switch the focus inside the container you just created by clicking on that container's area.
      When the container is selected, it is shown highlighted in blue.

    6. To add the Software Instance filter, select Software Instance: Software Instances running on this host, select the Name attribute, and define a condition where Name contains the word IIS
    7. Click Save condition.
  2. Create a filter for all UNIX hosts running Apache: 
    1. Switch the focus back to the root container by clicking it.
    2. Select OS Class from the list of the node attributes, and define a condition where OS Class contains the word UNIX.
    3. Click the Add Condition icon next to the OS Class filter you just created.
    4. Switch the focus inside the container you just created by clicking on that container's area.
    5. To add the Software Instance filter, select Software Instance: Software Instances running on this host, select the Name attribute, and define a condition where Name contains the word Apache.
  3. Change the root condition to say Host where Any of these conditions are true (default is All). 
  4. Click Save condition.

The resulting filter is provided below:

Previewing the filtered results 

List the filtered root nodes using the Click here to see the current candidate set button in the Filtering > BMC Discovery pane of the CMDB Sync page.

Then use the CMDB Sync Preview button (located above the candidate set) to see a Software Context view of the CMDB model of selected nodes from the candidate set. The preview includes the explicitly filtered nodes and the implicitly filtered nodes, those only connected to the model by explicitly filtered nodes.

Importing and Exporting filters

You can use the same filter with multiple CMDB connections by exporting and importing filtering definitions. These actions are available on the top of the Filtering tab on the CMDB Sync page.

Was this page helpful? Yes No Submitting... Thank you

Comments