Specify Optional Menu Item Enablement Filters

[Note to writers: do not show examples with * or ? wildcards at beginning of search string for this feature. It is allowed but performance is bad.]

If your SNMP Graph Action or Launch Action applies to Nodes, Interfaces, or Incidents, you can use the Filters Editor to create expressions that further define the context in which this Graph Action or Launch Action is available within NNMi. A Menu Enablement Filter limits the use of the Menu Item which uses this context. The Menu Item is disabled unless the selected object passes this filter.

Design complex Filters on paper as a Boolean expression first to minimize errors when entering your expressions using this Filters editor.

To create any Filter expressions:

  1. Navigate to the Menu Item Enablement Filter tab.
  2. Establish the appropriate settings for the filter you want to create. (See the Custom Filter Editor Settings table.)

    When creating any filters, note the following:

    • The Menu Item Enablement filters apply only to Node, Interface, and Incident Object Types. If you select an attribute that is not valid for the Object Type, that part of the filter is not applied.
    • Boolean Attributes begin with "is" and must contain the value true or false.
    • Each set of expressions associated with a Boolean Operator is treated as if it were enclosed in parentheses and evaluated together. View the expression displayed under Filter String to see the logic of the expression as it is created.
    • The AND Boolean Operators must contain at least two expressions.

      1. The placement of your cursor and the subsequent text that is selected is important when performing operations using the Additional Filters Editor. For example, you append to or replace, the expression that is selected.

      2. The placement of your cursor and the subsequent text that is selected is especially important when adding your Boolean operators. See Add Boolean Operators in the Additional Filters Editor for more information.
      3. You can drag any of the following items to a new location in the Filter String:

        • Filter Editor Options: AND, OR, NOT, EXISTS, NOT EXISTS
        • Filter Expression (Attribute, Operator, and Value)
      4. When moving items in the Filter String, note the following:

        • Click the item you want to move before dragging it to a new location.
        • As you drag a selected item, an underline indicates the target location.
        • If you are moving the selection up, NNMi places the item above the target location.
        • If you are moving the selection down, NNMi places the item below the target location.
        • If you attempt to move the selection to an invalid target location, NNMi displays an error message.
  3. Click  Save and Close to save and apply your changes.
Custom Filter Editor Settings
Attribute Description
Attribute

The attribute name NNMi should use as the filter criteria. Possible attributes include the following:

Note Boolean Attributes begins with "is" and must contain the value true or false.

Operator

The standard query language (SQL) operations to be used for the search. Valid operators are described below.

Note Only the is null Operator returns null values in its search.

  • = Finds all values equal to the value specified.
  • != Finds all values not equal to the value specified.
  • < Finds all values less than the value specified.
  • <= Finds all values less than or equal to the value specified.
  • > Finds all values greater than the value specified.
  • >= Finds all values greater than or equal to the value specified.
  • between Finds all values equal to and between the two values specified.
  • in Searches for a match in at least one of a series of values.
  • is not null Searches for all non-blank values.
  • is null Searches for all blank values.
  • like Enables you to find matches using the asterisk (*) and question mark (?) as wildcard characters. Question mark character means "any single character of any type at this location". Asterisk character means "any number of characters of any type at this location".
  • not between Finds all values except those between the two values specified.
  • not in Finds all values except those included in the list of values.
  • not like Finds all values except those included in the value specified. The not like operator enables you to use the asterisk (*) and question mark (?) as wildcard characters.
Value

The value for which you want NNMi to search.

Note the following:

  • The values you enter are case sensitive.

    Note When entering the Boolean values, true or false, use all lowercase.

  • NNMi displays a variable number of value fields depending on the Operator selected. For example, the between Operator causes two value fields to be displayed.
  • The in and not in operators require that each value be entered on a separate line.
Additional Filters Editor Buttons
Button Description
Append Appends the current expression (Attribute, Operator, and Value) to the selected expression already included in the filter string.
Insert Inserts the current expression (Attribute, Operator, and Value) in front of the cursor location within the Filter String.
Replace Replaces the selected expression with the expression displayed in the Attribute, Operator, and Value fields.
AND

Inserts the AND Boolean Operator in the selected cursor location.

Note View the expression displayed under Filter String to see the logic of the expression as it is created.

OR

Inserts the OR Boolean Operator in the current cursor location.

Note View the expression displayed under Filter String to see the logic of the expression as it is created.

NOT

Can be used in any part of the Filter String to specify that NNMi should exclude nodes with values that pass the expression that immediately follows the NOT.

For example, when evaluating the following Filter String, NNMi includes all nodes that have SNMP enabled and excludes any nodes with a Device Profile attribute value that includes Cisco as the Vendor value:

(isSysName = true AND NOT (devVendorNode=Cisco))

EXISTS

Used for filters that include Capabilities or Custom Attribute names and values in the Filer String. Indicates that you want NNMi to consider nodes that have Capabilities or Custom Attributes when evaluating the Filter String. For example, when evaluating the following Filter String, NNMi includes all nodes with a Capability having the Unique Value of com.hp.nnm.capability.metric.cse and ImportantRouters value of Building5:

(capability = com.hp.nnm.capability.card.cisco.c2900 AND EXISTS (customAttrName=ImportantRouters AND  customAttrValue=Building5))

Tip When creating complex Filter Strings that include customAttrName and customAttrValue pairs as one component of an "or" statement, to prevent NNMi from excluding Nodes that have zero Custom Attributes, use EXISTS or NOT EXISTS criteria for the customAttrName and customAttrValue pair definitions.

Otherwise Nodes that do not have any Custom Attributes are automatically excluded even if they have values that pass other aspects of your filter.

NOT EXISTS

Used for filters that include Capabilities or Custom Attribute names and values in the Filer String. Indicates that you want NNMi to consider interfaces that do not have any Capabilities or Custom Attributes when evaluating the Filter String, but exclude the objects that match the expression that follows the NOT EXISTS.

For example, when evaluating the following Filter String, NNMi includes all nodes with a hostname that includes router, followed by any number of characters, followed by xyz.com and excludes any nodes with a Custom Attribute named ImportantRouters with the value of Building5:

(hostname like router*.xyz.com AND NOT EXISTS (customAttrName=ImportantRouters AND customAttrValue=Building5))

Tip When creating complex Filter Strings that include customAttrName and customAttrValue pairs as one component of an "or" statement, to prevent NNMi from excluding Nodes that have zero Custom Attributes, use EXISTS or NOT EXISTS criteria for the customAttrName and customAttrValue pair definitions.

Otherwise Nodes that do not have any Custom Attributes are automatically excluded even if they have values that pass other aspects of your filter.

Delete

Deletes the selected expression.

Note If the Boolean Operator is selected, the Additional Filters Editor deletes all expressions associated with the Boolean Operator.