This documentation refers to a previously released version of BMC Discovery.
See the information on this topic for the latest version (11.3) or version 11.2.

The tw_pattern_management utility enables you to upload pattern modules to the appliance, activate or deactivate pattern modules on the appliance, and remove pattern modules that are no longer required. You can perform these operations on knowledge uploads (Technology Knowledge updates (TKUs)), individual pattern modules, or files.

You can review the functionality provided by the tw_pattern_management utility on the Knowledge management page. This page enables you to better understand and use the knowledge updates and patterns installed on BMC Discovery.

  • Pattern—A sequence of commands written in the Pattern Language (TPL), which contain instructions that identify scanned entities which are then used to create the BMC Discovery data model.
  • Module—A text file written in TPL which contains one or more patterns.
  • Knowledge uploads—Typically, these are TKU zip files that include:
    • Zip archives of patterns
    • HRD files
    • Device RPMs (DRPMS)

Options in the utility specify the actions to be performed on the pattern modules. To use the utility, type the following command:

tw_pattern_management [options] <upload/[upload:]module/file>  

where:

  • upload/[upload:]module/file is a knowledge upload name, a pattern module identifier, or an existing file. The necessary format to specify a pattern module is upload name:pattern module name. You can use shell parameter expansion to upload multiple matching files or all files in the current directory.
  • options are any of the options described in the following table and the common command line options described in Using command line utilities.

Command Line Option

Description

--activate-all

Activate all pattern modules

--activate-module

Activate a specific pattern module

--activate-upload

Activate pattern modules within knowledge upload

--deactivate-module

Deactivate a specific pattern module

--deactivate-upload

Deactivate pattern modules within knowledge upload

-f, --force

Deactivate patterns before they are removed

--install

Install pattern modules within knowledge upload. It does not activate the pattern modules.

--install-activate

Install and activate pattern modules within knowledge upload

-l, --list-uploads

List knowledge uploads

--remove-all

Remove all pattern modules

--remove-module

Remove a specific pattern module

--remove-upload

Remove the knowledge upload

--show-progress

Display the progress of the operation

Recommendation

To understand TPL patterns and how they might function in your environment, refer to Configipedia, BMC's community website that facilitates knowledge sharing around TPL patterns. Configipedia also provides visibility of the Technology Knowledge Update release schedule and contents.

Recommendation

If you build your own zip archives of patterns, make sure they comply with the standard zip format. Other formats will not work.

User examples

In the following examples, type the commands on a single line. Line breaks are provided to make the examples easier to read.

Uploading and activating several patterns within a knowledge upload

You can upload and activate several patterns as a knowledge upload by specifying the knowledge upload name and using the --install-activate option. To upload and activate several patterns:

  1. Change to the directory containing the TPL zip archives.

    tideway@appliance01 ~] $ cd tmp
    tideway@appliance01 tmp] $ ls 
    UploadA.zip  UploadB.zip 
  2. Use the utility to upload patterns (providing your password to run the command):

    tideway@appliance01 tmp] $ tw_pattern_management --install-activate *
    password:
    Uploaded UploadA.zip as knowledge upload "Upload A"
    Uploaded UploadB.zip as knowledge upload "Upload B"
    Knowledge uploads "Upload A", "Upload B" activated
    tideway@appliance01 tmp] $ 

Deactivating a pattern module

You can deactivate a pattern module by specifying the pattern module name and using the --deactivate-module option. To deactivate a pattern module, type the following command:

tideway@appliance01 ~] $ tw_pattern_management --deactivate-module "Host.ComputerSystem"
password:
1 pattern module deactivated 
tideway@appliance01 ~] $ 
Was this page helpful? Yes No Submitting... Thank you
  • No labels
© Copyright 2004 - 2018 BMC Software, Inc.
Legal notices