Managing Searches

Contents
casp1032
 
 
 
About Searches
You can create custom searches based on attribute values and various comparison criteria. This section describes how to create and manage custom searches. In general, these search management tasks are privileges that are granted only to OneClick administrators, not OneClick operators.
While OneClick operators cannot create and manage searches, they can launch them. For information about how operators can use searches, see the Using OneClick section.
Create Search Dialog
The Create Search dialog contains several options and settings for creating simple and complex searches. The following image is an example of the Create Search dialog.
  Depicts an example of a complex search in the Create Search dialog.  
The options and settings available in the Create Search dialog depend on the type of search you are creating.
  •  
    Attribute
    Specifies an attribute of a device to filter.
    If you choose an alphabetic attribute value, you can either clear (ignore) or select (include) the Ignore Case check box.
  •  
    Comparison Type
    Specifies the type of comparison to be made against the value specified in the Attribute field. Options can include Matches Pattern, Equal To, Not Equal To, Contains, Does Not Contain, Starts With, or Does Not Start With. Only the comparison types appropriate to the attribute’s data type are available.
  •  
    Ignore Case
    Specifies whether the comparison should be case-sensitive. Selecting the Ignore Case check box makes the comparison not case-sensitive. This selection is only available when it is appropriate for the data type of the attribute you selected.
  •  
    Attribute Value
    Enter or select the desired attribute value you want to use in the comparison.
    Depending on the attribute type you select, you may be able to search for empty attribute values by leaving this field blank.
    Remove the "Allow PCRE searches" privilege for operators if you do not want them to run regular expression searches. Operators without this privilege will only be able to run wildcard searches for applicable searches.
  •  
    Prompt for Value/Prompt When Launched
    To create a search that prompts users to enter an attribute value when they run the search, select the Prompt when Launched option and then enter the prompt to display in the Prompt for Value field. This feature lets you create searches that are flexible enough to meet the different search requirements of OneClick users.
    Consider the following implementation examples:
    • If you want to create a search that locates any particular device type, you could create a search with a string comparison type (contains, does not contain, begins with, and so on) that prompts users to provide a particular device name when they run the search.
    • If you want to create a search that locates any device type with a particular Condition attribute value, you could create a search that prompts users to provide a particular condition value when they run the search.
 
Note:
 You can clear all fields at any time by clicking Clear.
  •  
    Special Criteria
    Constrains the search criteria in one of the following ways:
    The Special Criteria options cannot be used for 'Interface Attributes' and 'Device Attributes'. To search only devices or interfaces, use the 'None' option in the Special Criteria.
    •  
      None
      Specifies that the search criteria will not be restricted to returning only devices or their interfaces.
    •  
      Interfaces of Devices
      Specifies that you want the search to return only the interfaces of the devices it finds in the results list.
    •  
      Devices Only
      Specifies that you want the search to return only devices in the results list.
  •  
    Show Advanced
    Opens the Advanced section of the Create Search dialog. The Advanced section in the Create Search dialog lets you create complex search criteria with any combination of nested AND clauses and OR clauses. This is represented in a tree structure grouped by logical operator (AND and OR) nodes. Each logical operator node can contain any number of attribute criteria nodes and other logical nodes. All nodes directly underneath a logical node are combined using the logical operator.
    •  
      Add
      Adds a new attribute criteria node to the selected AND node or OR node with the information you entered into the Attribute, Comparison Type, and Attribute Value fields.
    •  
      Apply
      Applies the information entered in the Attribute, Comparison Type, and Attribute fields to the selected attribute criteria node.
    •  
      New AND
      Adds a new AND operator node to the selected AND node or OR node.
    •  
      New OR
      Adds a new OR operator node to the selected AND node or OR node.
    •  
      AND/OR
      Toggles the selected AND node or OR node. That is, if the logical operation is currently AND, clicking this button changes it to OR and vice versa.
    •  
      Cut
      Removes the selected node. It can be pasted below another node.
    •  
      Paste
      Pastes the last removed node below the selected AND node or OR node.
    •  
      Clear
      Removes all the nodes below the root node.
    •  
      Add Existing
      (Optional) Adds existing attribute-based, action-based, or relation-based searches to your custom search.
      Adding an existing search to your custom search copies the existing search and embeds it, as it is now, into your custom search. If the existing search is later modified, your custom search will not change because it contains only a copy of that existing search, as it was when you copied it and added it to your custom search.
  •  
    Expression
    Displays a textual representation of the search criteria as you create it.
Create Simple Searches
You can create searches that use complex criteria, such as a combination of AND clauses and OR clauses. A simple search contains only a single expression. You can also save searches for later use and organize them in folders.
 
Follow these steps:
 
  1. Select the Locater tab in the Navigation panel.
  2. Do one of the following in the Locater tab:
    • If you want to create a new search from a blank template, click the create a new search icon  SPEC--createsearch_ICO (9.2) .
    • If you want to create a new search based on an existing search, select a search and click the copy the selected search  SPEC--copysearch_ICO .
Some searches cannot be copied and used as the basis for another search. For example, Devices > By IP Address cannot be copied. However, you can create a new advanced search and can copy 
any 
predefined search criteria into that search. For more information, see Add Existing Searches to Custom Searches.
The Create Search dialog opens.
  • Complete the fields in the dialog as desired.
  • Click Save As.
    The Save Search dialog opens.
  • Enter a name and a description for the search.
  • (Optional) Select the appropriate privilege if you want to limit access to the search to users who have a specific custom privilege. The privilege can be either assigned directly to the user or inherited from a role or user group.
    For more information about custom privileges, see the OneClick Customization section.
  • Select a folder for the search.
    The Locater folder is the top-level folder.
  • Click OK.
    The search is saved in the selected folder.
  • (Optional) Click Launch to run the search.
    The search results appear in the Results tab of the Contents panel.
  • Click OK.
Create Advanced Searches
Use the Advanced options in the Create Search dialog to create complex search criteria. You can build a search with many combinations of nested AND clauses and OR clauses.
 
Follow these steps:
 
  1. Select the Locater tab in the Navigation panel.
  2. Take one of the following steps on the Locater tab:
    • To create a search from a blank template, click the create a new search icon  SPEC--createsearch_ICO (9.2) .
    • To create a search from an existing search, select a search and click the copy the selected search icon  SPEC--copysearch_ICO .
Some searches cannot be copied and used as the basis for another search. For example, Devices > By IP Address cannot be copied. However, you can create a new advanced search and can copy 
any 
predefined search criteria into that search. For more information, see Add Existing Searches to Custom Searches.
The Create Search dialog opens.
  • Complete the fields in the dialog as desired.
  • Click Show Advanced to create complex search criteria that include a combination of AND clauses and/or OR clauses.
    The compound expression tree, logical operator buttons, and Expression field appear.
  • Click Add to move the single expression that you created in Step 3 to the compound expression tree.
    The single expression appears in the compound expression tree.
  • Click one of the following logical operator buttons to build a compound expression:
    • New AND
    • New OR
    • AND/OR
    The selected operator is inserted into the compound expression tree.
  • Repeat Step 3, Step 5, and Step 6 for each compound expression that you want to build.
  • (Optional) Add existing predefined search criteria.
  • Click Save As.
    The Save Search dialog opens.
  • Enter a name and a description for the search.
  • (Optional) Select the appropriate privilege from the Privilege drop-down list. Privileges limit access to the search to users with a specific custom privilege. Custom privileges can either be assigned directly or they can be inherited from a role or user group.
    For more information, see the OneClick Customization section.
  • Select a folder in which to save the search from the Save In Folder section.
    The Locater folder is the top-level folder.
  • Click OK.
    The Save Search dialog closes and you return to the Create Search dialog.
  • (Optional) Click Launch to run the search.
    The search results appear in the Results tab of the Contents panel. The applicable entities have been excluded from the results list based on the compound search expressions you specified.
  • Click OK.
    The Create Search dialog closes and you have now created an advanced search.
Add Existing Searches to Custom Searches
You can add existing attribute-based, action-based, or relation-based searches to any custom search you create. This lets you include predefined search criteria from existing searches including special searches such as All Devices and Devices By IP Address Range.
Adding an existing search to your custom search copies the existing search and embeds it, as it is now, into your custom search. If the existing search is later modified, your custom search will not change because it contains only a copy of that existing search, as it was when you copied it and added it to your custom search.
 
To add an existing search to your custom search
 
  1. Click the Locater tab in the Navigation panel.
  2. Click the create a new search icon  SPEC--createsearch_ICO (9.2) .
    The Create Search dialog opens.
  3. Complete the fields at the top of the dialog as desired.
  4. Click Show Advanced.
    The compound expression tree, logical operator buttons, and Expression field are displayed.
  5. Click Add Existing.
    The Add Existing Search dialog opens.
  6. Select the existing search that contains the criteria you want to copy and add to the current search and click OK.
    The Add Existing Search dialog closes and the criteria you selected is added to the compound expression.
  7. (Optional) Click set next to the criteria you added to modify prompt information as desired.
    The Search dialog opens.
  8. Do 
    one 
    of the following depending on whether you want to prompt users for a value:
    • Select 'Prompt the user' to configure how you want to prompt users:
    •  
      Prompt text
      Specifies the text you want to prompt users with when they run the search.
    •  
      Default value
      Specifies a default value for this prompt.
    •  
      Note:
       The default value is not shown to users until they run this search.
    • Select 'Specify value now' to enter the prompt value yourself now; users are not prompted to enter anything when they run this search.
  9. Click OK.
  10. Save the search as described Create Advanced Searches.
    You have now created a custom search that includes the addition of an existing search.
Search Recommendations
The following provides search criteria recommendations when defining advanced searches. The order of the criteria can affect the search performance.
The order of attribute criteria is based on two categories: 
storage of information
 and 
data type.
 
  •  
    Storage of information
    Attributes should be ordered from least CPU (quickest access) to most CPU (slowest access), as follows:
    • Memory flag (least CPU/quickest access)
    • Database flag
    • Calculated
    • External flag (most CPU/slowest access)
  •  
    Data type
    Attributes should be ordered from quickest comparison to slowest comparison, as follows:
    • Integer, counter, enumeration, model type handle (quickest comparison)
    • IP address, octet string
    • Text string (slowest comparison)
Combining the two categories of criteria, the overall attribute placement for complex searches of AND/OR order from top to bottom is as follows:
  1. Memory flag
    1. Integer, counter, enumeration, model type handle
    2. IP address, octet string
    3. Text string
  2. Database flag
    1. Integer, counter, enumeration, model type handle
    2. IP address, octet string
    3. Text string
  3. Calculated
    1. Integer, counter, enumeration, model type handle
    2. IP address, octet string
    3. Text string
  4. External Flag
    1. Integer, counter, enumeration, model type handle
    2. IP address, octet string
    3. Text string
 
Example
 
You would like to define a search based on the following search criteria (in no particular order):
  • ifDesc
  • Topology model name string
  • Network address
  • Model type handle
How should these attributes be ordered for best performance?
Using the recommended ordering logic, the following is the recommended order:
  1. Model type handle (memory flag : model type handle)
  2. Network address (memory flag/database flag : IP address)
  3. Topology model name string (calculated flag : text string)
  4. ifDesc (external flag : text string)
Edit Searches
You can edit a custom search that you have saved. The predefined searches cannot be modified.
 
Follow these steps:
 
  1. In the Locater tab, select the search from the available searches, and click the edit the selected search  SPEC--editsearch_ICO .
  2. Edit the search using the controls that are described in Create Search Dialog. Select an attribute criteria node to see its information. You can then modify the attribute criterion.
  3. Click Apply to change the selected node. Or click the Add button to create a new attribute criteria node.
  4. Click OK.
    The modified search is saved.
Delete Custom Searches
You cannot delete preconfigured folders and searches, but you can delete custom searches.
 
Follow these steps:
 
  1. On the Locater tab, to organize, rename, or delete your searches, click  SPEC--organizesearches_ICO .
    The Organize Searches dialog opens.
  2. Navigate to the custom search, and select it.
  3. Click Delete.
  4. Click OK.
    The custom search is deleted.
Organize Custom Searches
You can organize your custom searches in a folder hierarchy. Predefined folders and searches cannot be edited.
 
Follow these steps:
 
  1. On the Locater tab, to organize, rename, or delete your searches, click  SPEC--organizesearches_ICO .
    The Organize Searches dialog opens.
  2. Use the dialog to create a hierarchy of folders.
  3. Move the searches that you have created into the new folders.
  4. Use the Organize Searches dialog to rename or delete your custom folders and searches.
  5. Click OK.
    Your custom searches are organized.
Example Search Find Devices In Critical Condition
Create a compound search that finds all routers or switch routers with a status of "Critical." The following image shows an example of the Create Search dialog after the appropriate compound expressions have been added:
  spec--examplesearch_SCR  
The following procedure provides an example of a useful compound search.
 
Follow these steps:
 
  1. Select the Locater tab in the Navigation panel.
  2. On the Locater tab, to create a new search, click  SPEC--createsearch_ICO (9.2) .
    The Create Search dialog opens.
  3. Complete the fields as follows:
    •  
      Attribute
      Condition (0x1000a)
    •  
      Comparison Type
      Equal To
    •  
      Ignore Case
      N/A
    •  
      Attribute Value
      Critical
  4. Click the ‘Show Advanced’ button.
    The compound expression box and logical operator buttons appear.
  5. Click Add to move the single expression created in Step 3 to the compound expression tree.
    The single expression appears in the compound expression tree in text string format in the Expression field at the bottom of the Create Search dialog.
  6. Click the ‘New OR’ button.
    The OR operator is inserted into the compound expression tree, beneath the expression: Condition Equal To “Critical.”
  7. Complete the fields on top of the Create Search dialog, using the following parameters:
    •  
      Attribute
      Model Class (0x11ee8)
    •  
      Comparison Type
      Equal To
    •  
      Ignore Case
      N/A
    •  
      Attribute Value
      Router
  8. Click Add to move this expression to the compound expression tree.
    This expression (Model Class Equal To “Router”) is inserted into the compound expression tree, beneath the OR operator.
  9. Complete the fields on top of the Create Search dialog, using the following parameters:
    •  
      Attribute 
      Model Class (0x11ee8)
    •  
      Comparison Type
      Equal To
    •  
      Ignore Case
      N/A
    •  
      Attribute Value
      Switch-Router
  10. Click Add to move this expression to the compound expression tree.
    This expression (Model Class Equal To “Switch-Router”) is inserted into the compound expression tree, beneath the OR operator.
  11. (Optional) Click Save As to save this search in the Locater tab. You can then run it at any time.
  12. Click Launch to run the search immediately.
The search results appear in the Results tab of the Contents panel.
About OneClick Quick Device Search
OneClick allows you to directly find a device model without going to the Locater Search. Enter the full IP address of the device in the device search bar of the OneClick console. You can also find a device by its redundant IP addresses, if that device has 
Redundancy Preferred Addresses
. To find a device by its full name or a string, uncheck the "by IP Address" check box and enter the full name or a string.
The following image shows how the device search bar looks like:
 
model_search_OC_10_0_cropped.png
 
 
Searching by a String 
 
A search result that includes a list of all devices containing the matching string in their names is displayed. The search result includes device name, IP address, and the device landscape.
When you double-click the required device from the search result, the device is highlighted in the navigation panel.
 
Searching by Full Device Name or IP Address
 
The exact device is highlighted in the navigation panel. In a DSS environment when the device exists in multiple landscapes, you get the search result with the same information.
Select the device belonging to the required landscape.
In both cases, alarms and other information of the device are displayed in the Contents and Component Detail pane.
Ensure to enter a valid IP address when you find by IP address. Only a valid IPv4 address enables the search.