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.
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.
A Perl script is provided, that
- retrieves a device list from DA rest interface
- transforms the xml output to csv
- 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
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 (email@example.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>
-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 22.214.171.124 126.96.36.199
823 First Discovery Tue Jun 23 1:10:51 2015 -0400 TRUE READY 188.8.131.52 184.108.40.206 220.127.116.11 18.104.22.168
1964 USB QOS Fri Jul 10 3:23:45 2015 -0400 TRUE READY 10.241.250.140 22.214.171.124 126.96.36.199 188.8.131.52 184.108.40.206
1875 test_sugar01 Mon Jul 6 3:20:00 2015 -0400 TRUE READY 10.241.251.28 220.127.116.11 18.104.22.168 22.214.171.124 126.96.36.199
1929 Don Test Tue Jul 7 3:21:44 2015 -0400 TRUE READY 10.241.249.250 188.8.131.52 184.108.40.206 220.127.116.11 18.104.22.168