DX NetOps Portal update_alias_name.sh script returns error.

book

Article ID: 223442

calendar_today

Updated On:

Products

CA Performance Management - Usage and Administration DX NetOps

Issue/Introduction

I am attempting to change the names of ICMP Response path tests to more meaningful values. I have attempted to use the ./update_alias_name.sh script, but found it only appears to work for devices, and not for Response Path Tests, which appear to be an attribute, or related component of a device. 

Attempting to run the script with -T component generates the following errors:

[[email protected]<PortalHost> bin]# ./update_alias_name2.sh -h <PortalHost> -u admin -p <adminPasswd> -T component -o ComponentList.csv
Tue Sep  7 13:58:15 EDT 2021

Command to get list of device:
curl -k -s -X get "https://<PortalHost>:8182/pc/center/webservice/devices" -u admin:<adminPasswd> > FILENAME


Command to parse out device ids:
xmllint --shell <<<"xpath /devices/device/itemId/text()" FILENAME | grep content= | sed s/^[^=]\*=//


####### RESULT OF SEARCH  ##########################################
Device Items found: 7220
Creating csv file: ComponentList.csv

Command to get list of component:
curl -k -s -X get "https://<PortalHost>:8182/pc/center/webservice/devices/deviceItemId/DEVICEID/components" -u admin:<adminPasswd> > FILENAME

./update_alias_name2.sh: line 461: /tmp//tmp/returnedComponentItems.xml.linterr: No such file or directory
Component Items found: 0./update_alias_name2.sh: line 461: /tmp//tmp/returnedComponentItems.xml.linterr: No such file or directory
Component Items found: 0./update_alias_name2.sh: line 461: /tmp//tmp/returnedComponentItems.xml.linterr: No such file or directory
Component Items found: 0./update_alias_name2.sh: line 461: /tmp//tmp/returnedComponentItems.xml.linterr: No such file or directory
Component Items found: 0./update_alias_name2.sh: line 461: /tmp//tmp/returnedComponentItems.xml.linterr: No such file or directory
Component Items found: 0./update_alias_name2.sh: line 461: /tmp//tmp/returnedComponentItems.xml.linterr: No such file or directory
Component Items found: 0./update_alias_name2.sh: line 461: /tmp//tmp/returnedComponentItems.xml.linterr: No such file or directory

The same problems are seen when using -T interface.

It returns one error line per managed device it queries until it exits.

No data is added to the XML export file specified.

Cause

Problems in the script were identified that caused the errors.

Environment

All supported DX NetOps Performance Management releases

Resolution

Changes to the update_alias_names.sh script are required. There are numerous changes.

These changes are being made by the engineering team via defect DE514189. The current ETA from engineering has the updated and fixed new script added to the r21.2.4 release.

To resolve this now, without waiting for a new script in the r21.2.4 release, complete these steps.

  1. Download the attached new_update_alias_names.gzip file to the Portal server. Extract it using "gunzip new_update_alias_names.gzip".
  2. Run the following command (default path used) and not the ownership and permissions for the existing update_alias_names.sh script.
    • ls -al /opt/CA/PerformanceCenter/Tools/bin/update_alias_name.sh
    • Sample output from a default 21.2.1 lab would be:

      [[email protected]<PortalHost> bin]# ls -al /opt/CA/PerformanceCenter/Tools/bin/update_alias_name.sh
      -rwxr-xr-x 1 root root 19769 Sep  8 14:37 /opt/CA/PerformanceCenter/Tools/bin/update_alias_name.sh
      [[email protected]<PortalHost> bin]#

  3. Rename the existing script so it's no longer used. The following command can be used.
    • mv update_alias_name.sh update_alias_name.sh_old_doNotUse
  4. Copy the new_update_alias_name.sh script to (default path used) /opt/CA/PerformanceCenter/Tools/bin.
  5. Rename it using "mv new_update_alias_name.sh update_alias_name.sh".
  6. Ensure the updated script has the same ownership and permissions as the original.

The updated script should now work for both -T interface and component arguments.

Attachments

1631127521410__new_update_alias_name.sh.gz get_app