Free script to export the device list from Data Aggregator in a csv file

Document created by Lutz_Holzbecher Employee on Jul 1, 2015Last modified by SamCreek on Dec 17, 2016
Version 2Show Document
  • View in full screen mode

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

 

 

IDIPNAMESTATUS
188110.241.250.66 X-BREF-REV9951   UP
206510.241.248.157 n5bxcbfwl101UP
1580myhost_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.

 

1 person found this helpful

Outcomes