How can a query be constructed to return all agents existing in a specific IP range?

Document ID : KB000027369
Last Modified Date : 14/02/2018
Show Technical Document Details

Question: 

How can a query be constructed to return all agents existing in a specific IP range?

 

Environment:  

CA Client Automation - All Versions 

 

Answer: 

The steps for constructing the query to return all agents in a specific range are detailed below.

Note: The following IP range will be used to demonstrate the steps required:

41.202.148.29 - 141.202.148.120

  1. Create a new query by right clicking on Queries and selecting 'New'.

    Figure 1

  2. Double click on 'Computers'.


    Figure 2


  3. In the Query Designer window that comes up, select Inventory-Discovered Inventory. Expand Inventory-General Inventory-Network-IP Address.

  4. In the operator pull-down at bottom, change the '=' symbol to 'LIKE'.

  5. Enter the first value which in this case would be 141.202.148.29.

    Figure 3


  6. Click ok and yes to the Add inventory prompt.

    Note: Ignore the warning message each time; it is ok that no Boolean identifier is being used for these items.

    Figure 4


  7. Click 'OR' under the 'Boolean Operators' section and then browse again to Inventory-Discovered Inventory, etc.

  8. Add the next value for the argument. We have only accounted for '.29' at this point and we still need to account for .30 through .120. We can do this by repeating the process for the above line; where we pasted in 141.202.148.29, and replace the previous value with the following:

    141.202.148 .[ 3-9][0-9] - This searches .30 to .99
    141.202.148.1[0-1 ][ 0-9] - This searches .100 to .119
    141.202.148.120 - This accounts for .120

    The following figure demonstrates the final product:

    Figure 5