Boot time incorrect for all hosts - never gets updated

Problem:
Under “Hosts” - “All Hosts”, the column “Boot time” displays incorrect values.
It never gets updated.
Running uptime on the host reveals a discrepancy. It is incorrect for all hosts.

Expected outcome:
With REX working correctly, “Boot time” should be correct at all times, at least after a Reboot Job has ran.

Foreman and Proxy versions:
3.5.1

Foreman and Proxy plugin versions:
foreman-tasks 7.1.1
foreman_remote_execution 8.2.0
katello 4.7.3

Distribution and version:
Foreman: Rocky Linux 8
Hosts: CentOS 7, Rocky Linux 8, Rocky Linux 9

Other relevant data:
All hosts have Tracer installed and enabled.

Boot time comes out of facts delivered by the client. REX runs jobs. It doesn’t handle facts. You’ll have to run puppet or ansible for information/facts about the clients.

1 Like

Admittedly, this server is quite new, and Foreman is new to me.
I must have missed something in the installation documentation, as the Foreman host doesn’t seem to have any facts-gathering mechanisms in place.

    1:
/var/tmp/foreman-ssh-cmd-e7f7d154-44c9-49a3-9e92-5e013f9472a7/script: line 1: puppet: command not found
   2:
Exit status: 127

Is there a way to gather facts without installing anything on remote machines?
Is there good documentation that will compare Foreman’s Puppet vs. Ansible integration, so that I can decide what’s best for me?

Thanks

1 Like

+1

Did you find any work-around on this?

The whole “gathering of hosts facts” process seems to be somewhat hidden feature of Foreman since the “facts” do seem to be updated by some service/command that runs on the hosts when you issue an update of packages for example. I assume this can also be triggered manually?

Also seen this page → Foreman :: Updating Foreman inventory with system facts

I sill didn’t find a solution.
The document isn’t clear how facts gathering is scheduled, when Ansible is used.

  • Is it Foreman who’s supposed to gather facts from hosts on schedule?
  • Or is it the Ansible Manager (which in my case is on the Foreman host) which is supposed to gather facts on schedule?
  • Or is it the managed hosts, which should connect to Foreman’s Ansible Component using ssh to push their facts to the Foreman server?

In the latter case, I don’t want it work, because the “inbound” SSH port from remote hosts to Foreman is blocked for security reasons.

If I select all hosts and “Run all Ansible roles” manually, facts are gathered and updated. Ideally, I’d like to have a scheduler on Foreman which does scheduled facts gathering.

If that’s impossible, I will be forced to use Puppet, which at this time is not yet installed on remote hosts.

Any ideas would be appreciated.

It seems to be possible to schedule a facts gathering job on Foreman, which will rely on Ansible.
Although, maybe, this may not be the best way of doing it?

Question to Foreman specialists: is there a better way of doing it?

The way I managed to do it:

  1. Under “Hosts” - “All Hosts”
  2. Click the Button “Select Action”
  3. Click “Schedule Remote Job”
  4. Click “Use legacy form” (upper right corner)
  5. Fill out the form:

Hope this helps?