Problem:
I can see that both custom facts and facts generated by falcon crowdstrike in the GUI and within manifests eg
${facts[‘falcon’][‘version’]}
I can see them in a json file under direcctory /opt/puppetlabs/server/data/puppetserver/server_data/facts
But I’m having trouble seeing them with the api to foreman.
response = requests.get(foreman_url + ‘/api/hosts?per_page=all’ , verify=ssl_certs, headers=headers, auth=(username, marks_api_token))
print(response)
content = json.loads(response.content)
print(content)
I get lots of facts, but not the ones I happen to be interested in!
Expected outcome:
Well, facts about falcon which I can see elsewhere? Or indeed my custom facts I have created and can also see in the GUI and within puppet.
Foreman and Proxy versions:
foreman.noarch 3.11.1-1.el9
foreman-proxy.noarch 3.11.1-1.el9
Foreman and Proxy plugin versions:
Distribution and version:
https://yum.theforeman.org/plugins/3.11/el9/source
Other relevant data:
I’m not doing this work often so might be in a twist somewhere. I was thinking I needed a puppetdb but have tried that with no success. I don’t normally use the API so there could obviously be something I’m overlooking.
I would accept advice to start again if this works for others - I can start again as I’m migrating a service and right now I just have two hosts on so its no big deal to start again.
Any pointers to offer.