How to export the parent and child configuration on host

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
informatica
Posts: 99
Joined: Thu Jan 28, 2021 9:55 pm

How to export the parent and child configuration on host

Post by informatica »

Hi Team,

Could you please help me how to export the data with parent and child added to which host in nagios for all hosts.

which host is having parent/child we need to export the data.
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: How to export the parent and child configuration on host

Post by benjaminsmith »

Hi @informatica,

That information can be retrieved using the REST API, specifically the GET host/config endpoint. You can call this with a python/bash script and build a list of hosts and child hosts.

Code: Select all

curl -XGET "https://<ipaddress>/nagiosxi/api/v1/config/host?apikey=<APIKEY>&pretty=1"
Output:
{
"host_name": "host1.com",
"use": [
"xiwizard_xml_host"
],
"address": "host1.com",
"parents": [
"localhost"
],
Best Regards,
Benjamin
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
informatica
Posts: 99
Joined: Thu Jan 28, 2021 9:55 pm

Re: How to export the parent and child configuration on host

Post by informatica »

Instead of API Do we have any other way to download the parent and child associated to which host ???
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: How to export the parent and child configuration on host

Post by benjaminsmith »

Hi,

You can view object relationships in the CCM by clicking on the relationships link under the Actions menu. However, to generate a list or report, that would have to be done using the API or directly pulled from the nagiosql database.

--Benjamin
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked