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:
./update_alias_name.sh
The script parameters are listed and are described.
./update_alias_name.sh -h host_name -u username -p password [-T item_type] [-o output_filename]
Specifies the CA Performance Center host name to connect to.
Specifies the username of the CA Performance Center administrator who is to set the alias names.
Specifies the password for the CA Performance Center administrator who is to set the alias names.
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.
(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
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.
./update_alias_name.sh -h host_name -u username -p password [-T device] -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.
./update_alias_name.sh -h host_name -u username -p password -T device -i input_file -b batch_size -t time_in_seconds
Indicates the number of items to process in each batch.
Default: 10000
Default if the -i parameter is not specified: 150
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
|
Copyright © 2015 CA Technologies.
All rights reserved.
|
|