Page 2 of 2

Re: Show all host to hostgroup and parent relations

Posted: Tue Sep 27, 2011 7:04 am
by TSCAdmin
cwscribner wrote:As simplistic as this sounds, all I really need in the short term is a table: left column-hosts right column-parent device(s)
I have developed a little Perl script that I believe fulfills your need with an exception that the parent devices appear in left column and child devices in right. I believe this format makes it easier for the end user to map the relationship between them.

The script outputs the data in a comma separated format which looks something like following on the shell

Code: Select all

us-ham-lse-0020,us-ham-svb-0065


us-ham-wna-0001,us-ham-rtr-0001


gb-slo-svr-0009,pd_eur_1_del_srv
,pd_eur_2_del_srv


atlas,center
,dvport
,ts_irl
,ts_uk
but if you redirect the output to a file

Code: Select all

$ ./parent_child.pl > relationships.csv
and open the output file in Microsoft Office Excel, you will get something better which can easily be decorated:
output.PNG
Did you require something like this? I will post the script here if the answer is affirmative :)