Previous Topic: Set Alias Names For Multiple Monitored DevicesNext Topic: Dashboards and Reports


Set Alias Names For Interfaces and Components On Multiple Monitored Devices

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:

  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 interfaces and components, type the following command:
    ./update_alias_name.sh
    

    The script parameters are listed and are described.

Example: Set Alias Names for Interfaces

  1. To return a complete list of interfaces that a Data Aggregator host is monitoring, 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

    Specify interface.

    -o output_filename

    (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

  2. Modify the .csv file that was created in the previous step, noting the alias name that you want to set for each interface. This file must have the following format: Device Item ID, Interface Item ID, Interface 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 , 164, MyInterface1AliasDisplayName

    561, 165, MyInterface2AliasDisplayName

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

  3. Type the following command:
    ./update_alias_name.sh -h host_name -u username -p password -T interface -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 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.

  4. (Optional) To set alias names for a large number of interfaces, 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 interface -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 interface -i input_file -b 20 -t 2
    

Example: Set Alias Names for Components

  1. To return a complete list of components that a Data Aggregator host is monitoring, 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

    Specify component.

    -o output_filename

    (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

  2. Modify the .csv file that was created in the previous step, noting the alias name that you want to set for each component. This file must have the following format: Device Item ID, Component Item ID, Component Alias Name.

    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.

  3. Type the following command:
    ./update_alias_name.sh -h host_name -u username -p password -T component -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 components.

  4. (Optional) To set alias names for a large number of components, 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 -T component -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 component -i input_file -b 20 -t 2
    

More information:

Add an IP Domain