0

I am trying to extract a report using puppetdb facts endpoint .I want to know how many servers have a specific setting available which is calculated by a custom fact and returns as a true or false.The custom facter is added in a module and the module is available on the nodes . I can see the custom fact is available in the nodes and returning the expected results.But I am unable to collect the output from a puppetdb API query .Do I need to add anything specific for a custom fact to retrieve via puppetdb facts endpoint?

aannjose
  • 62
  • 1
  • 14
  • 1
    Could you add some details and show us the code you've tried, please? Currently there isn't enough detail in your question to be able to answer – Jon Jan 28 '21 at 08:48
  • sure , for example I am able to get the desired output for the below code "curl -k -X GET -H https://puppetserver1:8081/pdb/query/v4/facts --data-urlencode 'query=["and",["=","name", "kernel"],["=","value","AIX"]]'", But not with my custom fact .I used the same query "curl -k -X GET -H https://puppetserver1:8081/pdb/query/v4/facts --data-urlencode 'query=["and",["=","name", "custom_fact_name"],["=","value","true"]]' " – aannjose Jan 28 '21 at 11:55

0 Answers0