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.
Problems in the script were identified that caused the errors.
All supported DX NetOps Performance Management releases r21.2.3 and older
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 updated and fixed script was added to the r21.2.4 release. Upgrade to r21.2.4 or newer to get the new script.
To resolve this now, without waiting for a new script in the r21.2.4 or newer releases, complete these steps.
The updated script should now work for both -T interface and component arguments.