search cancel

PM - How to update the port and protocol in CleanupComponents.sh script

book

Article ID: 213348

calendar_today

Updated On:

Products

CA Performance Management - Usage and Administration

Issue/Introduction

As per below Tech Doc we ran the cleanupComponents.sh script but we received  errors as we are using port 8582 and HTTPS protocol.

How do I remove inactive elements?
https://knowledge.broadcom.com/external/article?articleId=15856

Cause

By default cleanupComponents.sh script is configured to use port 8581 and HTTP protocol

Environment

Any

Resolution

Run the following commands to update the port, protocol and curl calls:

1.- [[email protected]]# sed -i.bak1 's/8581/8582/' cleanupComponents.sh

2.- [[email protected]]# sed -i.bak2 's/curl -s/curl -sk/' cleanupComponents.sh

 

3.- Replace 

DAHOST="$BASE:8582/rest/devices/components/filtered"

to

DAHOST="https://$BASE:8582/rest/devices/components/filtered"

 

4.- Replace 

curl -sk -H "Content-Type: application/xml" -X GET "$BASE:8582/rest/dataaggregator" > /tmp/dataaggregator_$$.xml

to

curl -sk -H "Content-Type: application/xml" -X GET "https://$BASE:8582/rest/dataaggregator" > /tmp/dataaggregator_$$.xml

 

5.- Replace 

DAHOST="$BASE:8582/rest/syncable/deletelist"

to

DAHOST="https://$BASE:8582/rest/syncable/deletelist"

 

6.- Save the file

Additional Information

How do I remove inactive elements?
https://knowledge.broadcom.com/external/article?articleId=15856

413 errors: Request entity is larger than limits defined by server error using REST.
https://knowledge.broadcom.com/external/article?articleId=95411

DA REST calls over HTTPS
https://community.broadcom.com/enterprisesoftware/communities/community-home/digestviewer/viewquestion?ContributedContentKey=1fe41877-1c04-4735-bbfa-c1480a49e8da&CommunityKey=671164c3-e575-4b08-96ab-edc2e1ceed13&tab=digestviewer#4b8cbed1-19dc-45d2-9740-e6745d51618d