Creating and editing publication filters

Use publication filters to determine which components are published to the cell from BMC Atrium CMDB. The filters select the CIs that satisfy the filter condition from BMC Atrium CMDB. In case the filter is a "Publish me and my providers" filter, the impact providers of the CIs are also selected. For more information, see About publication filters for BMC Atrium CMDB publishing.

You can create publication filters using one of the following configuration item (CI) selection methods:

  • Static CI selection method: select CIs imported from BMC Atrium CMDB from a static list. 
  • Dynamic CI selection method: select CIs imported from BMC Atrium CMDB that match a specified pattern. The specified pattern uses regular expressions.

Filter ID and Filter Name

The Filter ID and Filter Name of a publication filter are similar. There is a slight difference in their format. By default, the Filter ID is the same as the Filter Name, but with spaces removed. For example, if the filter name is CS Filter, the filter ID is CSFilter.

Creating static publication filters

  1. In the administrator console, expand the Root > Advanced Options > BMC Atrium CMDB > Publication Filter folder.

  2. Right-click the Publication Filter folder, and select Create Publication Filter.

  3. Enter values for Filter Name and Filter ID
    Note: The Filter ID cannot include any spaces. By default, the Filter ID is the same as the Filter Name, but with spaces removed. For example, if the filter name is CS Filter, the filter ID is CSFilter.

  4. (Optional) Enter a 255-character-or-less description in the Description field.

  5. Select Static (the default) from the CI Selection Method list.

  6. Select (the default) or clear Include all impact providers of selected CIs.

  7. To get the available CIs, select (the default) or clear Show only top level CIs. Top-level CIs are top-level consumers, that is, consumers that are not providers to other CIs.

  8. Select the CI type and click Retrieve. You can further restrict the available CIs by providing a regular expression in the Name field. Regular expressions are case sensitive.

  9. From the list of available CIs, select CIs that you want to show in the service model and click Add, or click Add All to add all the available CIs.  

  10. Click OK to close the Create Publication Filter dialog box.

Creating dynamic publication filters

  1. In the administrator console, expand the Root > Advanced Options > BMC Atrium CMDB > Publication Filter folder.

  2. Select and right-click the Publication Filter folder, and select Create Publication Filter.

  3. Enter values for Filter Name and Filter ID
    Note: The Filter ID cannot include any spaces. By default, the Filter ID is the same as the Filter Name, but with spaces removed. For example, if the filter name is CS Filter, the filter ID is CSFilter.

  4. (Optional) Enter a 255-character-or-less description in the Description field.

  5. Select Dynamic from the CI Selection Method list.

  6. Select (the default) or clear Include all impact providers of selected CIs.

  7. Using regular expressions, type a pattern by which to match CI names.

  8. Click the + button to add another pattern. You can use up to eleven patterns. The patterns are connected by a logical AND operator.

  9. Click OK to close the Create Publication Filter dialog box.

Adding service model component types for publication filters

The CI types displayed in the Type list in the Create Publication Filter dialog box are managed by the pronet.admin.cmdb.RootCiTypesForPublicationFilter property in the pronet.conf file.

For example, if you want to add the BMC_ConcreteCollection CI type, in the conf/pronet.conf file, modify the pronet.admin.cmdb.RootCiTypesForPublicationFilter property to add BMC_ConcreteCollection as follows:

#Atrium CMDB CI types for import publication filter.
#RootCiTypesForPublicationFilter=<CiTypeId>,{<CiTypeName>}
pronet.admin.cmdb.RootCiTypesForPublicationFilter=BMC_Application,BMC_ApplicationService,BMC_BusinessService,BMC_BusinessProcess,BMC_ComputerSystem,BMC_DataBase,BMC_Organization,BMC_UserCommunity,BMC_ConcreteCollection

Restart TrueSight Infrastructure Management server after updating the pronet.conf file for the changes to take effect.

For a list of supported service model component types, see Service model component types. You can add additional service model component types (custom CI types or CI types that belong to core CDM or certain CMDB extensions). For more information, see Managing Classes.

Defining publication filters with selection conditions on attributes other than Name

You can define dynamic publication filters with selection conditions on attributes other than Name. However, you cannot do this using the administrator console. 

Do the following:

  1. Manually copy the pw/server/log/userfilters_sample.xml file to the pw/server/log/<publishing_server> directory. 
  2. Rename the copied file to userfilters.xml.
  3. Edit the file to define dynamic publication filters with selection conditions. 

    Consider these while defining dynamic publication filters

    • You can define dynamic publication filters with selection conditions on attributes other than Name. 
    • Ensure that the Filter ID cannot include any spaces. By default, the Filter ID is the same as the Filter Name, but with spaces removed. For example, if the filter name is CS Filter, the filter ID is CSFilter.
    • You can only use fields that exist at the CMDB level.
    • Following are the list of operators that can be used:
      • Equal
      • Like (To specify variable characters as value, use %)
    • To specify CMDB Null as value, use $NULL$
    • Any attribute defined for the class can be used while creating the filter.
    • The content-version must be set to 2.
    <?xml version="1.0" encoding="UTF-8" ?> 
    <filters>
    
     <filter>
      <name>Server ComputerSystems</name> 
      <id>ServerComputerSystems</id> 
      <description>Server ComputerSystems</description> 
      <content version="2">
       <class>BMC_ComputerSystem</class> 
       <importtype>onlymyself</importtype> 
       <selectiontype>dynamic</selectiontype> 
       <selection>
        <condition>
         <attribute>PrimaryCapability</attribute> 
         <operator>Equal</operator> 
         <value>Server</value> 
        </condition>
       </selection>
      </content>
     </filter>
    
     <filter>
      <name>Cat1 - Item1</name> 
      <id>Cat1Item1</id> 
      <description>Cat1 - Item1</description> 
      <content version="2">
       <class>BMC_BusinessService</class> 
       <importtype>includeproviders</importtype> 
       <selectiontype>dynamic</selectiontype> 
       <selection>
        <and>
         <condition>
          <attribute>Category</attribute> 
          <operator>Equal</operator> 
          <value>Cat1</value> 
         </condition>
         <condition>
          <attribute>Item</attribute> 
          <operator>Equal</operator>
          <value>Item1</value> 
         </condition>
        </and>
       </selection>
      </content>
     </filter>
    
     <filter>
      <name>Like</name>
      <id>Like</id> 
      <description>Like</description> 
      <content version="2">
       <class>BMC_BusinessService</class>
       <importtype>includeproviders</importtype> 
       <selectiontype>dynamic</selectiontype> 
       <selection>
        <condition>
         <attribute>Category</attribute> 
         <operator>Like</operator> 
         <value>Cat%</value> 
        </condition>
       </selection>
      </content>
     </filter>
    
     <filter>
      <name>All but Cat1 and Cat2</name> 
      <id>Cat</id> 
      <description>All but Cat1 and Cat2</description> 
      <content version="2">
       <class>BMC_BusinessService</class> 
       <importtype>onlymyself</importtype> 
       <selectiontype>dynamic</selectiontype> 
       <selection>
        <not>
         <or>
          <condition>
           <attribute>Category</attribute> 
           <operator>Equal</operator> 
           <value>Cat1</value> 
          </condition>
          <condition>
           <attribute>Category</attribute> 
           <operator>Equal</operator> 
           <value>Cat2</value> 
          </condition>
         </or>
        </not>
       </selection>
      </content>
     </filter>
    </filters>
  4. Save the userfilters.xml file.

  5. Restart the pserver.
    Note: On successful processing, the userfilter file is renamed as userfilter_x, where x is the computed incrementally based on the last number. For example, if the last created userfilter name is userfilter_10, then the newly created filter will be renamed as userfilter_11.

Editing publication filters

  1. In the administrator console, expand the Root > Advanced Options > BMC Atrium CMDB > Publication Filter folder.
  2. Select and right-click the publication filter name and select Edit Publication Filter.
  3. Make the required changes and click OK.

When a publication filter's selection criteria are modified, a publication will be executed. Hence, CIs that were previously selected but are no longer selected are removed from the cell (provided they are not selected by another publication filter).

Deleting publication filters

  1. In the administrator console, expand the Root > Advanced Options > BMC Atrium CMDB > Publication Filter folder.
  2. Select and right-click the publication filter name and select Delete Publication Filter.

The publication filter is deleted and the CIs that were published by the filter will no longer be published. These CIs are removed from the cell (provided they are not also selected by another publication filter).

Note

If a filter is deleted, removal from the system could take some time. The amount of time can depend on the number of CIs or other factors, such as an inability to communicate with the cell (as when the cell is not running). During this time the system cannot create another filter with the same filter ID.

Note

Alternatively, do the following to delete the publication filters:

  1. Unregister from the environment by running the penv set -p "FilterIds=<remaining filterIds>" command. 
  2. Delete the filters from the PN:PublishFilters form.
  3. Restart the Publishing Server.


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

Comments

  1. Pete Flores

    It's not clear here is one should be able to edit user filters (userfilters.xml). User can see them in Admin console > Publication filter > Right click filtername and option to Edit is avaiable (also delete). But you can select edit nothing happens. I suppose this is because for user filters one cannot edit in Admin console? You edit userfilters.xml directly?

    Mar 05, 2018 12:30
  2. Mohana Ghotankar

    Mukta Kirloskar,

    User should delete and then edit userfilters.xml and restart publishing server to get new user flters.


    Regards

    Mohana

    Mar 20, 2018 04:59
  3. Sameer Khan

    Under "Defining publication filters with selection conditions on attributes other than Name" section, note should be added saying that "content version" must always be set to 2 for user defined publish filters.

    Publish filters with content version 1 or no content version are publish filters created using Administration console and content version 2 is only for user defined publish filters.

    Creating user defined publish filter with content version 1 results in publish failure.

    Jul 10, 2018 04:22