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.
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:
- Open a command prompt and access the following directory:Performance_Center_installation_directory/PerformanceCenter/Tools/bin
- To set alias names for monitored devices, type the following command:./update_alias_name.sh
- To return a complete list of monitored devices, type the following command:./update_alias_name.sh -hhost_name-uusername-ppassword[-Titem_type] [-ooutput_filename]
- -h host_nameSpecifies thePerformance Centerhost name.
- -u usernameSpecifies the username of the administrator who sets the alias names.
- -p passwordSpecifies the password for the CAPerformance Centeradministrator who sets the alias names.
- -T item_typeSpecifies the type of item for which you want to set alias names.Acceptable values:device, interface, or component.Default:deviceKeep the default value.
- (Optional) -o output_filenameCreates 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:
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 ">".
- 560, MyRouter1AliasDisplayName
- 561, MyRouter2AliasDisplayName
- Type the following command:./update_alias_name.sh -hhost_name-uusername-ppassword[-T device] -iinput_file-i input_fileSpecifies 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 -hhost_name-uusername-ppassword-T device -iinput_file-bbatch_size-ttime_in_seconds
- –b batch_sizeIndicates the number of items to process in each batch.Default:10000Default with the -i parameter unspecified:150
- –t time_in_secondsIndicates the time, in seconds, to pause between batches.Default:1Default with the -i parameter unspecified:1Example:./update_alias_name.sh -hhost_name-uusername-ppassword-T device -iinput_file-b 20 -t 2