Set Alias Names For Multiple Monitored Devices

To set aliases for multiple monitored devices simultaneously, use a script that is included with capm. The alias appears in the inventory lists for devices and interfaces. An alias that you set using this script takes precedence over the alias that is set by importing a CSV file when you add an IP domain.
capm260
To set aliases for multiple monitored devices simultaneously, use a script that is included with
CA Performance Management
. The alias appears in the inventory lists for devices and interfaces. An alias that you set using this script takes precedence over the alias that is set by importing a CSV file when you add an IP domain.
The script returns a list of device item IDs and device names in CSV format. Add the alias names that you want to set on each monitored device to the CSV file. The script reads the updated CSV file and sets the alias names for the monitored devices.
Follow these steps:
  1. Open a command prompt and access the following directory:
    Performance_Center_installation_directory/PerformanceCenter/Tools/bin
  2. To set alias names for monitored devices, type the following command:
    ./update_alias_name.sh
  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
      Performance Center
      host name.
    • -u username
      Specifies the username of the administrator who sets the alias names.
    • -p password
      Specifies the password for the CA
      Performance Center
      administrator who sets the alias names.
    • -T item_type
      Specifies the type of item for which you want to set alias names.
      Acceptable values:
      device, interface, or component.
      Default:
      device
      Keep the default value.
    • (Optional) -o output_filename
      Creates a CSV file with the total number of monitored devices by itemID and Device Name. Use this command to specify to override the default file name. If you do not enter a value for this parameter, DeviceList.csv is used for the .csv file.
      The CSV file has the following format: Device ItemID, Device Name.
      Examples:
      • 560, MyRouter1
      • 561, MyRouter2
    • Modify the CSV file as needed. Take note of the alias name that you want to set for each monitored device. This file has the following format: Device ItemID, Device Alias Name.
      If the Item IDs in your CSV file are invalid, the entries are ignored.
      Examples:
      • 560, MyRouter1AliasDisplayName
      • 561, MyRouter2AliasDisplayName
      For devices, the Alias Name value must be URL-encoded. Commas are allowed in the Alias Name field of the .csv file. Spaces must be URL-encoded as “%20”.
      For interfaces and components, the Alias Name value must be XML-encoded. Commas and spaces are allowed in the Alias Name value of the .csv file. The ampersand character must be encoded “&”. The less-than character must be encoded “<”. The greater-than character must be encoded as ">".
    • 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 name of the CSV file.The alias names are set for monitored devices. If this parameter is not specified, the script finds all the item IDs that are required for the specified type, and creates a CSV file with item IDs and item names.
    • (Optional) To control the workload when you set alias names for many monitored devices, type the following command, which adjusts the batch size and creates pauses between batches:
      ./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 with the -i parameter unspecified:
        150
      • –t time_in_seconds
        Indicates the time, in seconds, to pause between batches.
        Default:
        1
        Default with the -i parameter unspecified:
        1
        Example:
        ./update_alias_name.sh -h
        host_name
        -u
        username
        -p
        password
        -T device -i
        input_file
        -b 20 -t 2