script to list children of a parent host

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
troyb
Posts: 3
Joined: Wed Aug 04, 2021 5:49 pm

script to list children of a parent host

Post by troyb »

Hello everyone,

I am looking to see if there is a script out there that can generate a list of "HOST NAMES" that are a child of a parent HOST NAME. Additionally there is a way to generate a list of services on said child hosts, that would be great. Trying to not write a script for this if one is already out there.

Did some searching but came up empty.

Best,

-Troy
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: script to list children of a parent host

Post by mcapra »

The JSON Query Generator might be of interest:
https://labs.nagios.com/2014/06/19/expl ... -7-part-1/

Should be included in Nagios Core by default at this point -- no need to install anything additional, just navigate to:

Code: Select all

http://<nagios server>/nagios/jsonquery.html
Former Nagios employee
https://www.mcapra.com/
Locked