Summary
This document describes a custom perl script that retrieves the discovery profiles and their ip address from Data Aggregator and saves it in a csv file.
Background
Customers like to get the list of all devices being discovered in a single page for easy management. This ensures that there are no duplicates or there are no double discoveries.
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::Simple
- access to the Data Aggregator REST webservice http://DA:8581/rest
Support
There is no support for this script. It has to be run at YOUR risk. See terms and conditions before running this script here (Terms for User sites - CA Technologies). Please email Seenu_Mathew (seenu.mathew@ca.com) for any feedback on this script.
Usage of getDiscProfileList.pl is as follows
-h <hostname or ip address of CA Data Aggregator>
-p <port number>
-f <filename>
-help <to display this help message>
Example: perl getDiscProfileList.pl -h DataAggregatorHostname -p 8581 -f profiles
The above command will create a csv file called profiles.csv with the list of Names, Createtimes, ID etc..
ID Name CreateTime IcmpDiscoveryEnabled RunStatus IPList
5982 StevemTestJuniVPN Tue Sep 1 5:13:10 2015 -0400 FALSE READY 10.241.250.218 138.42.96.22 138.42.96.25
823 First Discovery Tue Jun 23 1:10:51 2015 -0400 TRUE READY 138.42.246.19 138.42.96.33 138.42.96.213 138.42.96.24
1964 USB QOS Fri Jul 10 3:23:45 2015 -0400 TRUE READY 10.241.250.140 138.42.96.22 138.42.96.25 138.42.96.42 138.42.96.43
1875 test_sugar01 Mon Jul 6 3:20:00 2015 -0400 TRUE READY 10.241.251.28 138.42.96.22 138.42.96.25 138.42.96.42 138.42.96.43
1929 Don Test Tue Jul 7 3:21:44 2015 -0400 TRUE READY 10.241.249.250 138.42.96.22 138.42.96.25 138.42.96.42 138.42.96.43