Previous Topic: Narrowing a Search with FiltersNext Topic: Set Alias Names For Interfaces and Components On Multiple Monitored Devices


Set Alias Names For Multiple Monitored Devices

CA Performance Center includes a script to set aliases for multiple monitored devices. You can use this script to set the aliases for more than one monitored device at a time. The alias appears in the inventory list of devices and in the inventory list of interfaces.

Note: An alias that is set using this script takes precedence over the alias that you can set by importing a CSV file when you add an IP domain. For information on importing a CSV file, see the CA Performance Center Administrator Guide.

This script has two functions. First, the script returns a list of device item IDs and device names in .csv format. You modify the .csv file to include the alias names that you want to set on each monitored device. The second function of the script is to take the updated .csv file and set the alias names for the monitored devices.

Follow these steps:

  1. Open a command prompt and access the Performance_Center_installation_directory/PerformanceCenter/Tools/bin directory.
  2. To call the script to set alias names for monitored devices, type the following command:
    ./update_alias_name.sh
    

    The script parameters are listed and are described.

  3. To return a complete list of monitored devices, type the following command:
    ./update_alias_name.sh -h host_name -u username -p password [-T item_type] [-o output_filename]
    
    -h host_name

    Specifies the CA Performance Center host name to connect to.

    -u username

    Specifies the username of the CA Performance Center administrator who is to set the alias names.

    -p password

    Specifies the password for the CA Performance Center administrator who is to set the alias names.

    -T item_type

    Specifies the type of item that you want to set alias names for. Valid values are device, interface, or component.

    Default: device

    Keep the default value.

    -o output_filename

    (Optional) Creates a .csv file with the total number of monitored devices by itemID and Device Name with a different filename for the .csv file than the default filename. If you do not enter a value for this parameter, the default name, DeviceList.csv, is used for the .csv file.

    The .csv file has the following format: Device ItemID, Device Name.

    For example:

    560, MyRouter1

    561, MyRouter2

  4. Modify the .csv file that was created in the previous step, noting the alias name that you want to set for each monitored device. This file must have the following format: Device ItemID, Device Alias Name.

    Note: if the Item IDs in your .csv file are invalid, no error messages appear. These invalid entries are ignored.

    For example:

    560, MyRouter1AliasDisplayName

    561, MyRouter2AliasDisplayName

    Note: Commas and spaces are allowed in the Alias Name field of the .csv file.

  5. Type the following command:
    ./update_alias_name.sh -h host_name -u username -p password [-T device] -i input_file 
    
    -i input_file

    Specifies the filename of the .csv file that you created previously with the alias names.

    The alias names are set for monitored devices.

    Note: If -i is not specified, the script looks up all of the item IDs that are required for the specified type, and creates a csv file with item IDs and item names.

  6. (Optional) To set alias names for a large number of monitored devices, type the following command to adjust the batch size and pause between batches. These adjustments help to control the workload:
    ./update_alias_name.sh -h host_name -u username -p password -T device -i input_file -b batch_size -t time_in_seconds
    
    –b batch_size

    Indicates the number of items to process in each batch.

    Default: 10000

    Default if the -i parameter is not specified: 150

    –t time_in_seconds

    Indicates the time, in seconds, to pause between batches.

    Default: 1

    Default if the -i parameter is not specified: 1

    For example:

    ./update_alias_name.sh -h host_name -u username -p password -T device -i input_file -b 20 -t 2
    

More information:

Add an IP Domain