Hello,
I was wondering if there is an easy way to get a report of all child relationships (hosts) for a parent host. For example, I want to generate a list of every device (host) connected to a switch. All of the hosts are entered correctly but we have so many, I am trying to simply get a list of all child devices off a single switch. I tried using the Hypermap but we have too many devices.
Thank you,
Shane
Report on child relationships
Re: Report on child relationships
This should do the trick(replace 'localhost' with the actual parent host):
Code: Select all
echo "select nagios_hosts.display_name from ((nagios_objects INNER JOIN nagios_host_parenthosts ON nagios_objects.object_id=nagios_host_parenthosts.parent_host_object_id)INNER JOIN nagios_hosts ON nagios_host_parenthosts.host_id = nagios_hosts.host_id) where nagios_objects.name1='localhost';" | mysql -uroot -pnagiosxi -DnagiosAs of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Report on child relationships
Thank you for the code and I apologize for the following newbie question, but where do I run that from? The SSH console?
Re: Report on child relationships
Yes, run it from the command line of the XI machine.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Report on child relationships
Thank you so much! That worked perfectly!
Re: Report on child relationships
Glad to hear!
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.