Nothing shown in webgui

I have setup a foreman server for only puppet reporting.

I have an external puppet server and I can see the reports coming in to my foreman.

I can see the data in the database.

Nothing is shown in the webgui though…

What could I have done wrong, not done properly?

Foreman 1.24.1 on RHEL 7.7

Hi and welcome to the forum :slight_smile:

Usually, this behaviour is due missing to organization and location associations. Organizations and locations are part of the permission management in Foreman. By default, you should have a “Default Location” and “Default Organization” (unless you gave those a different name during installation). You can change the context you are using in the WebUI from the top bar. There should be two drop-down menus, one for each context. They are displayed as your current context (so e.g. “Default Location” and “Default Organization”). When you switch to “Any organization” and “Any location”, you should be able to see your hosts and reports in the UI.
After that, you can move the hosts to your organization and location. In the settings (found unter Administer -> Settings), there are to options to modify the behaviour once an unknown/new host sends a report for the first time. The are called “Default location” and “Default organization”. You can set those to your org/loc so future hosts will be associated correctly by default.
Please note that, after moving hosts to the organization/location, old reports will still not be accessible in that context, but future ones should be.

If you have further questions or this did not help you with your problem, feel free to ask again :slight_smile:


Ok, that helped, thanks!

Now, how do I get the facts from my puppetserver to my foreman?

I found some old post about the importance of pointing to the correct directory in /etc/puppetlabs/puppet/foreman.yaml.
I’m using puppet 6 and foreman 1.24 and I’ve pointed :puppetdir: to /opt/puppetlabs/server/data/puppetserver, which seems to include the relevant data - but it’s not read and sent with the reports.
Anything else I’ve missed or done wrong?

Do I need the nodes.rb-file? Eventhough I’m not using neither the puppetserver nor the ENC-functionality of my foreman?

Ok, adding that to /etc/puppetlabs/puppet/puppet.conf caused all clients to balk since they’re apparently trying to execute that file locally…

How do I get only the master to run it and send the facts to foreman?

TBH, I never actually tried to integrate an external Puppet server with Foreman.
About a year ago, I have wrote down my thoughts about how that might be achieved for a Puppet enterprise system here, but there was no further response whether that worked.
The easiest way would probably be to set your Puppetserver up as smartproxy, but that will configure Foreman as ENC as well (which I do not know if you want).
There is an installer option (–puppet-server-external-nodes) that you could use to point to a different ENC script, but I can not guarantee that this is the only option you will need to set depending on your setup.


I’m only looking to get Foreman to be a report engine for my puppet server, and I want what I get in Foreman when manually running nodes.rb on my puppet server - nodes runs will get there by the “reports foreman” in puppet.conf, but I want the facts as well - which I do get if running a for loop for each node on the server. Maybe it’s time to write a script run by cron that will upload the facts to Foreman.
I was just hoping that I could combine the nodes.rb script with the reports, to get it to run when submitting reports.

Ok, I see. I was assuming that the report processor would hand the upload of facts, too, but obviously that was wrong. In that case you will probably need to go with a custom script solution. Afaik, there is no option to just handle fact uploads on it’s own and I could not find anything related to that either.

Yeah, I too thought that the report processor would handle the facts upload - and possibly it will, if configured correctly, but I have no idea how to configure it correctly then…

The ENC script has alternative run modes where it can use inotify the facts YAML directory and upload when a new file shows up. Haven’t used it personally but that may be more what you want. There’s also this PR that might be relevant:

Yes, I’ve found that out - but do I have to create a cron-job to run it?
Is there no config option to get it to run as part of the report processor?

No, there’s no out of the box support for that. Here is where it’s an open source project: we can point you in the right direction but the last mile is up to you.

Ok, thanks - then I know I have to do it myself, I don’t have to look after a solution that doesn’t exist.
(BTW, this is an honest answer, not sarcasm - I do thank you for the reply, saiving from spending time looking for something that doesn’t exist)

1 Like

I don’t know what you mean by the alternative mode of the ENC script.
The indicated PR doesn’t seem to be included in the current version of the external_node_v2.rb-script…