Summary
This document describes a custom perl script that retrieves a device list with contact status from Data Aggregator and saves it in a csv file.
Background
Customers like to get current inventory data from CA PM and also check for devices that are in a non-UP state.
Approach
A Perl script is provided, that:
- retrieves a device list from DA rest interface
- transforms the xml output to csv
Prerequisites
- Perl installed (tested with Strawberry Perl 5.18)
- Perl modules REST::Client, XML::XSLT
- access to the Data Aggregator REST webservice http://DA:8581/rest
Usage
getDeviceContactStatus.pl DA_host_and_port (e.g. IMDA:8581) outputfilename (without suffix)
Example
perl getDeviceContactStatus.pl IMDA:8581 devices
creates output files devices.xml and devices.csv
devices.csv view in table format
ID | IP | NAME | STATUS |
---|
1881 | 10.241.250.66 | X-BREF-REV9951 | UP |
2065 | 10.241.248.157 | n5bxcbfwl101 | UP |
1580 | | myhost_CAMM_IM_SelfMonitoring | UNKNOWN |
.... | | .... | |
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.