Event when host is fully provisioned?

Problem:
Hello everybody,

I have been trying for a long time to set up a webhook so that Foreman notifies me when a host (a Debian 10.13 virtual machine from Bare-metal, to be precise) is beginning to be installed an OS via Foreman or the installation of an OS has been successful.

I initially theorized the correct event would be “Build Entered/Exit” or “Remote Execution Host Job Succeeded”, but logs do not document any type of event enqueuing when the installation starts/ends.

I just wanted to know if such an event exists or not. And if so, whether there is a way to register or monitor it.

Expected outcome:
Some log output expressing foreman webHooks has detected a new event (If it exists).

Other relevant data:
For instance, the following extract of /var/log/foreman/production.log shows up when Installation is in progress:

2024-05-04T17:23:43 [I|app|2c9a09ca] Completed 200 OK in 89ms (Views: 35.1ms | ActiveRecord: 13.7ms | Allocations: 13655)
2024-05-04T17:23:44 [I|app|002f9044] Started GET "/notification_recipients" for 192.168.1.79 at 2024-05-04 17:23:44 +0000
2024-05-04T17:23:44 [I|app|002f9044] Processing by NotificationRecipientsController#index as JSON
2024-05-04T17:23:44 [I|app|002f9044] Completed 200 OK in 37ms (Views: 0.2ms | ActiveRecord: 18.8ms | Allocations: 2239)
2024-05-04T17:23:54 [I|app|b54c06fd] Started GET "/notification_recipients" for 192.168.1.79 at 2024-05-04 17:23:54 +0000
2024-05-04T17:23:54 [I|app|b54c06fd] Processing by NotificationRecipientsController#index as JSON
2024-05-04T17:23:54 [I|app|b54c06fd] Completed 200 OK in 18ms (Views: 0.1ms | ActiveRecord: 5.5ms | Allocations: 1993)
2024-05-04T17:24:04 [I|app|98d048aa] Started GET "/notification_recipients" for 192.168.1.79 at 2024-05-04 17:24:04 +0000
2024-05-04T17:24:04 [I|app|98d048aa] Processing by NotificationRecipientsController#index as JSON
2024-05-04T17:24:04 [I|app|98d048aa] Completed 200 OK in 14ms (Views: 0.1ms | ActiveRecord: 4.7ms | Allocations: 1990)
2024-05-04T17:24:34 [I|app|0501e364] Started GET "/notification_recipients" for 192.168.1.79 at 2024-05-04 17:24:34 +0000
2024-05-04T17:24:34 [I|app|0501e364] Processing by NotificationRecipientsController#index as JSON
2024-05-04T17:24:34 [I|app|0501e364] Completed 200 OK in 15ms (Views: 0.1ms | ActiveRecord: 4.9ms | Allocations: 1979)
2024-05-04T17:24:44 [I|app|46c15971] Started GET "/notification_recipients" for 192.168.1.79 at 2024-05-04 17:24:44 +0000
2024-05-04T17:24:44 [I|app|46c15971] Processing by NotificationRecipientsController#index as JSON
2024-05-04T17:24:44 [I|app|46c15971] Completed 200 OK in 15ms (Views: 0.1ms | ActiveRecord: 5.1ms | Allocations: 1979)
2024-05-04T17:24:54 [I|app|f06aed9f] Started GET "/notification_recipients" for 192.168.1.79 at 2024-05-04 17:24:54 +0000
2024-05-04T17:24:54 [I|app|f06aed9f] Processing by NotificationRecipientsController#index as JSON
2024-05-04T17:24:54 [I|app|f06aed9f] Completed 200 OK in 18ms (Views: 1.3ms | ActiveRecord: 1.6ms | Allocations: 1978)
2024-05-04T17:25:04 [I|app|20f1508a] Started GET "/notification_recipients" for 192.168.1.79 at 2024-05-04 17:25:04 +0000
2024-05-04T17:25:04 [I|app|20f1508a] Processing by NotificationRecipientsController#index as JSON
2024-05-04T17:25:04 [I|app|20f1508a] Completed 200 OK in 13ms (Views: 0.4ms | ActiveRecord: 1.3ms | Allocations: 1978)
2024-05-04T17:25:14 [I|app|2ad94e2c] Started GET "/notification_recipients" for 192.168.1.79 at 2024-05-04 17:25:14 +0000
2024-05-04T17:25:14 [I|app|2ad94e2c] Processing by NotificationRecipientsController#index as JSON
2024-05-04T17:25:14 [I|app|2ad94e2c] Completed 200 OK in 15ms (Views: 0.2ms | ActiveRecord: 5.0ms | Allocations: 1979)
2024-05-04T17:25:24 [I|app|7d834c35] Started GET "/notification_recipients" for 192.168.1.79 at 2024-05-04 17:25:24 +0000
2024-05-04T17:25:24 [I|app|7d834c35] Processing by NotificationRecipientsController#index as JSON
2024-05-04T17:25:24 [I|app|7d834c35] Completed 200 OK in 16ms (Views: 0.1ms | ActiveRecord: 5.1ms | Allocations: 1979)
2024-05-04T17:25:34 [I|app|d0c08c53] Started GET "/notification_recipients" for 192.168.1.79 at 2024-05-04 17:25:34 +0000
2024-05-04T17:25:34 [I|app|d0c08c53] Processing by NotificationRecipientsController#index as JSON
2024-05-04T17:25:34 [I|app|d0c08c53] Completed 200 OK in 16ms (Views: 0.1ms | ActiveRecord: 4.6ms | Allocations: 1979)
2024-05-04T17:25:44 [I|app|f4c2b927] Started GET "/notification_recipients" for 192.168.1.79 at 2024-05-04 17:25:44 +0000
2024-05-04T17:25:44 [I|app|f4c2b927] Processing by NotificationRecipientsController#index as JSON
2024-05-04T17:25:44 [I|app|f4c2b927] Completed 200 OK in 14ms (Views: 0.2ms | ActiveRecord: 4.8ms | Allocations: 1979)
2024-05-04T17:25:54 [I|app|67add13a] Started GET "/notification_recipients" for 192.168.1.79 at 2024-05-04 17:25:54 +0000
2024-05-04T17:25:54 [I|app|67add13a] Processing by NotificationRecipientsController#index as JSON
2024-05-04T17:25:54 [I|app|67add13a] Completed 200 OK in 17ms (Views: 0.1ms | ActiveRecord: 4.9ms | Allocations: 1979)
2024-05-04T17:26:04 [I|app|a1d5377d] Started GET "/notification_recipients" for 192.168.1.79 at 2024-05-04 17:26:04 +0000
2024-05-04T17:26:04 [I|app|a1d5377d] Processing by NotificationRecipientsController#index as JSON
2024-05-04T17:26:04 [I|app|a1d5377d] Completed 200 OK in 16ms (Views: 0.2ms | ActiveRecord: 5.5ms | Allocations: 1979)
2024-05-04T17:26:14 [I|app|24e03ec8] Started GET "/notification_recipients" for 192.168.1.79 at 2024-05-04 17:26:14 +0000
2024-05-04T17:26:14 [I|app|24e03ec8] Processing by NotificationRecipientsController#index as JSON
2024-05-04T17:26:14 [I|app|24e03ec8] Completed 200 OK in 16ms (Views: 0.2ms | ActiveRecord: 4.2ms | Allocations: 1979)
2024-05-04T17:26:24 [I|app|1924e91c] Started GET "/notification_recipients" for 192.168.1.79 at 2024-05-04 17:26:24 +0000
2024-05-04T17:26:24 [I|app|1924e91c] Processing by NotificationRecipientsController#index as JSON
2024-05-04T17:26:24 [I|app|1924e91c] Completed 200 OK in 15ms (Views: 0.1ms | ActiveRecord: 4.5ms | Allocations: 1979)
2024-05-04T17:26:34 [I|app|1287a8f4] Started GET "/notification_recipients" for 192.168.1.79 at 2024-05-04 17:26:34 +0000
2024-05-04T17:26:34 [I|app|1287a8f4] Processing by NotificationRecipientsController#index as JSON
2024-05-04T17:26:34 [I|app|1287a8f4] Completed 200 OK in 16ms (Views: 0.1ms | ActiveRecord: 5.0ms | Allocations: 1979)
2024-05-04T17:26:44 [I|app|a58a6aee] Started GET "/notification_recipients" for 192.168.1.79 at 2024-05-04 17:26:44 +0000
2024-05-04T17:26:44 [I|app|a58a6aee] Processing by NotificationRecipientsController#index as JSON
2024-05-04T17:26:44 [I|app|a58a6aee] Completed 200 OK in 15ms (Views: 0.2ms | ActiveRecord: 4.3ms | Allocations: 1979)
2024-05-04T17:26:54 [I|app|d9690cf9] Started GET "/notification_recipients" for 192.168.1.79 at 2024-05-04 17:26:54 +0000
2024-05-04T17:26:54 [I|app|d9690cf9] Processing by NotificationRecipientsController#index as JSON
2024-05-04T17:26:54 [I|app|d9690cf9] Completed 200 OK in 15ms (Views: 0.1ms | ActiveRecord: 3.8ms | Allocations: 1979)
2024-05-04T17:27:04 [I|app|b6fac588] Started GET "/notification_recipients" for 192.168.1.79 at 2024-05-04 17:27:04 +0000
2024-05-04T17:27:04 [I|app|b6fac588] Processing by NotificationRecipientsController#index as JSON
2024-05-04T17:27:04 [I|app|b6fac588] Completed 200 OK in 16ms (Views: 0.1ms | ActiveRecord: 4.8ms | Allocations: 1979)

That’s what I was going to recommend. In my logs I can see these being fired

# grep EventSubscriber production.log
2024-05-06T10:44:39 [I|app|64d5d708] ForemanWebhooks::EventSubscriber: build_entered.event.foreman event received
2024-05-06T10:44:39 [I|app|64d5d708] ForemanWebhooks::EventSubscriber: host_created.event.foreman event received
2024-05-06T10:55:47 [I|app|9b4e9fdf] ForemanWebhooks::EventSubscriber: build_exited.event.foreman event received

Could you find the request which started the build and paste the full logs for that request here?