This documentation supports releases of BMC Helix Continuous Optimization up to December 31, 2021. To view the latest version, select the version from the Product version menu.

Managing tagging rules for tag-based search and filtering

You can use the out-of-the-box tagging rules to group similar entities together, simplify the creation of entity filters and manage the searching condition for the required group of entities. In addition, you can create and manage the custom tagging rules for the required tag types to improve the search results for required entities. 

Viewing the list of available tagging rules

To view the list of available tagging rules, Select Administration > Tag Management > Tagging rules. The Tagging rules page is displayed.

Creating a custom tagging rule

You can create a custom tagging rule using an existing tag type to improve the tag-based search and filtering.

Before you create, ensure that required tag type is available. 

To create a custom tagging rule

  1. Select Administration > Tag Management > Tagging rules and click Add tagging Rule.

  2. Enter values for the following parameters:
    • Name: Type the required name for the new tagging rule.
    • Description: Type the required description for the new tagging rule type.
    • Rule status: Select one of the following options to set the state of the new rule after creation:
      • Active: Automatically applies the tag associated with the new rule to the entities that match the rule condition when the Tagging Rule Manager task (system task) is run.
      • Inactive: Creates the rule without including in the Tagging Rule Manager task (system task). If you select this option, the tag associated with this rule will not be applied to the entities that match the rule condition when the Tagging Rule Manager task is run.
    • Rule type: Select one of the following options for the Rule type:

      Rule type

      Description

      Additional options

      Copy the value of a configuration metric

      Select this option to identify entities with the selected configuration metric, and create a tag with the value of the metric as the name and apply the tag to the matching entity. For example, if you choose OS_FAMILY as the configuration metric, tag values will be "Linux", "Windows", etc. depending on the operating system family.

      This option considers the structureid (category of the entity type) of the selected configuration metric:

      • If the selected metric has structureid as SYS, tags are applied to the matching systems only.
      • If the selected metric has structureid as WKLD, tags are applied to the matching business drivers only.

      For more details, see Example for adding tags using configuration metric .

      • Configuration Metric: Select the required configuration metric from the drop-down list to be used for matching entities with same configuration metric.
      • Tag Type: Select the required tag type to be used in this tagging rule.

      Use a regular expression based on a configuration metric

      Select this option to apply tag to the entity with the selected configuration metric that matches with the required regular expression (e.g. "Windows(.*)"), and applies a tag with the value specified in the Tag parameter.

      The tag specified in the Tag field is applied to the matching entities.

      For more details, see Example for adding tags using a regular based on a configuration metric .

      • Configuration Metric: Select the required configuration metric from the drop-down list to be used as base for matching entities with matching regular expression.
      • Regexp: Type the required regular expression to perform match of entities with the selected configuration metric, for example, "ApplicationServer (d+)"
      • Tag: Type the required name of the tag to be applied to matching entities.
      • Tag Type: Select the tag type to be used with this tagging rule.

      Use a regular expression based on the name of a system or business driver

      Select this option to apply tag to the entity with the system or business driver that matches with the required regular expression.

      The tag specified in the Tag field is applied to the matching entities.

      For more details, see Example for adding tags using regular expression based on the name of a system or business driver .

      • Apply to: Select system or business driver to perform the match of regular expression with the system or business driver name.
      • Regexp: Type the required regular expression to perform match with the pattern used for system or business driver name.
      • Tag: Type the required name of the tag to be applied to matching systems or business drivers.
      • Tag Type: Select the tag type to be used with this tagging rule.

      In the Advanced mode, you can also set Filtering options to filter entities.

      Use a custom script based on a configuration metric

      Select this option to apply tag to the entity with the selected configuration metric that matches with the required custom script.

      Use the out variable to apply tag to the matching entities. For example, to apply VMware tag to the matching entities, specify out.add ('VMware') in the custom script.

      For more details, see Example for adding tags using custom script based on a configuration metric .

      • Configuration Metrics: Select the required configuration metrics from the drop-down list to be used as base for matching entities with matching custom script. You can select one or more configuration metrics.
      • Custom script: Type the required custom script to perform match of entities with the selected configuration metrics.

        The custom script must be written in JavaScript. The following variables are available:

        • Name: The name of the system (or business driver).
        • enttypeid: The ID of the entity type.
        • enttypenm: The string name of the entity type.

        If applicable, the values of the selected configuration metrics are provided in variables called as the resource name (for example, CPU_NUM).

        Tags must be placed in the out variable. For example, to apply VMware tag to the matching entities, specify out.add ('VMware') in the custom script.

      • Tag Type: Select the tag type to be used with this tagging rule.

      Use a custom script based on the name of a system or business driver name

      Select this option to apply tag to the entity with the system or business driver that matches with the required custom script.

      Use the out variable to apply tag to the matching entities. For example, to apply VMware tag to the matching entities, specify out.add ('VMware') in the custom script.

      For more details, see Example for adding tags using custom scripts based on the name of a system or business driver .

      • Apply to: Select system or business driver to perform the match of custom script with the system or business driver name.
      • Custom script: Type the required custom script to perform match of required systems or business drivers.

        The custom script must be written in JavaScript. The following variables are available:

        • Name: The name of the system (or business driver).
        • enttypeid: The ID of the entity type.
        • enttypenm: The string name of the entity type.

        If applicable, the values of the selected configuration metrics are provided in variables called as the resource name (for example, CPU_NUM).

        Tags must be placed in the out variable. For example, to apply VMware tag to the matching entities, specify out.add ('VMware') in the custom script.

      • Tag Type: select the tag type to be used in this tagging rule. 

      In the Advanced mode, you can also set Filtering options to filter entities.

      Note on tags and tag types

      • A tag name and tag type cannot contain the following special characters: 
        [ ] , : ; " | * & \ / ? $ £ ( ) { } ^ ~
      • A tag type must not exceed 50 characters.
      • A tag name (value) must not exceed 4000 characters.
  3. Click Save.
    The required tagging rule is created and added to the list of available tagging rule.

Activating or deactivating a tagging rule

You can activate an inactive tagging rule to automatically apply the tag associated with that rule to the entities that match the rule condition when the Tagging Rule Manager task (system task) is run. You can also deactivate an active rule to remove the tag associated with that rule from the entities that match the rule condition when the Tagging Rule Manager task is run. For more details about running or scheduling a system task, see Managing ETL and System tasks.

  1. Select Administration > Tag Management > Tagging rules.
    The Tagging rules page is displayed.
  2. For the required inactive tagging rule, click to activate the rule.
    OR
    For the required active tagging rule, click to deactivate the rule.
    The required rule is activated or deactivated and the tag for the entities that match rule condition will be updated accordingly when the Tagging Rule Manager task (system task) is run.

Editing or deleting a custom tagging rule

You can edit or delete a custom tagging rule according to your requirement. You cannot modify or delete an out-of-the-box tagging rule.

  1. Select Administration > Tag Management > Tagging rules.
    The Tagging rules page is displayed.
  2. Click  or to edit or delete the required custom tagging rule.
Was this page helpful? Yes No Submitting... Thank you

Comments