# run from puppetdb1001 # get list of all nodes curl http://localhost:8080/pdb/query/v4/nodes | jq -r '.[] | .certname' > all-nodes.txt mkdir resources # get some/all catalogs head -n50 all-nodes.txt | xargs -P20 -I@ /bin/sh -c 'curl -s http://localhost:8080/pdb/query/v4/catalogs/@/resources > resources/@' cat all-nodes.txt | xargs -P20 -I@ /bin/sh -c 'curl -s http://localhost:8080/pdb/query/v4/catalogs/@/resources > resources/@' # jq search jq '.[] | select(.type == "Nrpe::Monitor_service") | select(.parameters.critical != false and .parameters.critical != true) ' resources/* # empty output!