Feature #36104
closedAs a user, I want to be able to trigger webhooks only on explicit host updates
Description
The current model of webhooks allows to subscribe to the host_updated event, which is not only triggered on actual changes to the host but also on many reoccurring events like fact imports or puppet report uploads.
While this might be useful for some use-cases, this creates a lot of unnecessary overhead and "noise" if you only want to react to actual changes of the host (via API PUT /api/hosts/:id, WebUI, or hammer).
With the current model, subscribing a webhook to the host_updated event also spams tasks a lot, which might lead to performance impacts. In our test environment with about 80 hosts running Puppet once per hour, this leads to approximately 6 tasks per minute, and this scales linearly with the amount of hosts you have. In production, when we enable the webhook, we on average got 10 tasks created per second.
For further reference, including a description of our use-cases, see https://community.theforeman.org/t/migrating-to-webhooks-shellhooks-are-we-doing-things-wrong/32203