CA Performance Center includes a script to set alias names for interfaces and components across multiple monitored devices. Users see the alias names in the inventory list of interfaces and in dashboards and views, depending on the role rights you assign.
This script has two functions. First, the script returns a list of interface item IDs or component item IDs, and interface names or component names in .csv format. You modify the .csv file to include the alias names that you want to set for interfaces or components. The second function of the script is to take the updated .csv file and set the alias names for the interfaces or components.
Follow these steps:
./update_alias_name.sh
The script parameters are listed and are described.
Example: Set Alias Names for Interfaces
./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
Specify interface.
(Optional) Creates a .csv file with the total number of interfaces by Device Item ID, Interface Item ID, and Interface 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, InterfaceList.csv, is used for the .csv file.
The .csv file has the following format: Device Item ID, Interface Item ID, Interface Name.
For example:
560, 164, MyInterface1
561, 165, MyInterface2
Note: if the Item IDs in your .csv file are invalid, no error messages appear. These invalid entries are ignored.
For example:
560 , 164, MyInterface1AliasDisplayName
561, 165, MyInterface2AliasDisplayName
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 interface -i input_file
Specifies the filename of the .csv file that you created previously with the alias names.
The alias names are set for interfaces.
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 interface -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 interface -i input_file -b 20 -t 2
Example: Set Alias Names for Components
./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
Specify component.
(Optional) Creates a .csv file with the total number of components by Device Item ID, Component Item ID, and Component 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, ComponentList.csv, is used for the .csv file.
The .csv file has the following format: Device Item ID, Component Item ID, Component Name.
For example:
565, 166, MyComponent1
566, 167, MyComponent2
Note: if the Item IDs in your .csv file are invalid, no error messages appear. These invalid entries are ignored.
For example:
565 , 166, MyComponent1AliasDisplayName
566, 167, MyComponent2AliasDisplayName
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 component -i input_file
Specifies the filename of the .csv file that you created previously with the alias names.
The alias names are set for components.
./update_alias_name.sh -h host_name -T component -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 component -i input_file -b 20 -t 2
|
Copyright © 2015 CA Technologies.
All rights reserved.
|
|