DX NetOps Manager

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

07-01-2015 08:01 AM

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.

 

Statistics
0 Favorited
11 Views
1 Files
0 Shares
4 Downloads
Attachment(s)
zip file
getDeviceContactStatus.zip   1K   1 version
Uploaded - 05-29-2019

Tags and Keywords

Comments

11-12-2015 12:19 PM

Thanks Lutz

07-02-2015 01:43 PM

Thanks for sharing this with the community!

07-01-2015 08:40 AM

Good one . Thanks Lutz

Related Entries and Links

No Related Resource entered.