This document describes sample Perl scripts to combine CA PC item information with OpenAPI query output in batch.
Use Case
Based on an OpenAPI query, a batch script creates a CSV output with metrics from device components like response path elements. The report should include the item name alias, but the AlternateName attribute in OpenAPI is currently available only for devices and interfaces and not for other components.
Approach
- Retrieve the list of device components with name alias from CA PC REST interface. This can be achieved by customizing the update_alias script that comes with CA PC.
As an alternative, you can of course have your own script that retrieves the component items of choice using CA PC REST interface. - Manually clean up the device component list and only keep the items of interest.
- Translate the CA PC itemIDs to DA itemIDs from calling CA PC web service:
script itemIdPC2DA.pl
- Enrich the OpenAPI output CSV file with the item name alias by looking up previous script output:
script enrichCSV.pl
Prerequisites
- CA PM 3.2 and above
- Script host with Perl and access to CA PC port 8181
- Perl 5.18 or greater with modules REST::Client
Installation and further details are described in attached PDF.
Your feedback is appreciated so please post any comments in this thread. As with all free Infrastructure Management Field Developed Utility postings, inquiries should be made through questions or comments in this thread, and the author, Lutz_Holzbecher, will provide a response.
All information downloaded or accessed (including field packs, customized solutions, patches etc.) are provided AS IS and no warranties are provided or made. For more information you may click here.