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.
How to export the parent and child configuration on host
-
- Posts: 99
- Joined: Thu Jan 28, 2021 9:55 pm
-
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: How to export the parent and child configuration on host
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.
Output:
Benjamin
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"
Best Regards,{
"host_name": "host1.com",
"use": [
"xiwizard_xml_host"
],
"address": "host1.com",
"parents": [
"localhost"
],
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!
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
- Posts: 99
- Joined: Thu Jan 28, 2021 9:55 pm
Re: How to export the parent and child configuration on host
Instead of API Do we have any other way to download the parent and child associated to which host ???
-
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: How to export the parent and child configuration on host
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
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!
Be sure to check out our Knowledgebase for helpful articles and solutions!