DX NetOps Manager

 View Only

Enrich OpenAPI component query output with name alias 

May 04, 2018 03:39 AM

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.

 

Statistics
0 Favorited
3 Views
2 Files
0 Shares
4 Downloads
Attachment(s)
pdf file
EnrichOpenAPIwithAlias.pdf   397 KB   1 version
Uploaded - May 29, 2019
zip file
enrichOpenAPIwithAlias.zip   3 KB   1 version
Uploaded - May 29, 2019

Tags and Keywords

Comments

May 04, 2018 11:47 AM

Thank you very much for this.  Not only do I think this will work with very little modification it more importantly has filled in some gaps for me about what kind of data is stored where in PM and how to access it.

Thanks,

Paul

Related Entries and Links

No Related Resource entered.