Show all host to hostgroup and parent relations

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
TSCAdmin
Posts: 155
Joined: Wed Apr 14, 2010 3:00 pm
Location: India

Re: Show all host to hostgroup and parent relations

Post 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 :)
You do not have the required permissions to view the files attached to this post.
Locked