Finding the IP address of parent host

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
cskang
Posts: 68
Joined: Sat Mar 05, 2011 4:13 pm

Finding the IP address of parent host

Post by cskang »

I need to find the host name (IP address is ok too) of Parent host of a specified host.
How can I do this?
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Finding the IP address of parent host

Post by mguthrie »

Can you give us a little more detail as to where you need this and what you need it for? I'm not really sure how to answer that without more explanation.
cskang
Posts: 68
Joined: Sat Mar 05, 2011 4:13 pm

Re: Finding the IP address of parent host

Post by cskang »

I am planning to design a web-page that finds all parents for a user specified host, and then search for the data in the service output of the parent hosts.
I was hoping that backendapiURL may have a link which may display host and parent host relationship, but I could not find any.
Is there a plan for NagiosXI backendapiURL to include a link to have read access to host-parent host relationship?
Or is there any alternative way to access the current host and parent host relationship from php web page?
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Finding the IP address of parent host

Post by mguthrie »

We have backend data commands for XML, take a look at these and see if they get you what you need.

[url]http://<yourhost>/nagiosxi/backend/?cmd=getparenthosts[/url]
[url]http://<yourhost>/nagiosxi/backend/?cmd=gethosts[/url]
cskang
Posts: 68
Joined: Sat Mar 05, 2011 4:13 pm

Re: Finding the IP address of parent host

Post by cskang »

Thanks.
https://<yourhost>/nagiosxi/backend/?cmd=getparenthosts
provided me the information that I was searching for.

Regards,
Charles
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Finding the IP address of parent host

Post by mguthrie »

Good deal! Let us know if you have any additional questions.
Locked