Foreman UI does not show Puppet facts

Problem:

In the Foreman UI, Monitoring > Facts shows host fact values reported by Red Hat (mainly physical facts following a reboot), but no recent host facts reported by Puppet. This used to work, but the most recent Puppet facts showing are from 8 days ago, and things like uptime should be reported frequently.

Running puppet agent --test on the hosts completes successfully, but the facts don’t appear in the UI. Also, running facter -p on the hosts completes successfully and shows all the facts, but again they don’t show up in the Foreman UI.

We’re not running puppetdb.

Any ideas what might be going wrong here?

Foreman and Proxy versions:

Foreman 3.11
Katello 4.13
Puppet 7.17

Distribution and version:

Alma Linux 8

We have had a similar issue when we updated from Puppet 6 to Puppet 7.
The cause on our end was that Puppetserver and the Foreman node.rb (ENC and fact upload script) where differently configured in terms of format for fact storage. Puppet 6 stored fact cache as yaml, while Puppet 7 defaults to storing facts as json. We somehow managed to mess that up and had Puppet configured to continue storing as yaml (in /etc/puppetlabs/puppet/routes.yaml) while the node.rb expected json (configured in /etc/puppetlabs/puppet/foreman.yaml).
Depending on the age of your environment and the installer options you used, it might also be your node.rb script is outdated (compare /etc/puppetlabs/puppet/node.rb with Github).

If both of these are not the issue, do you see any erros in the logs that might be related?