Project

General

Profile

Actions

Feature #36104

closed

As a user, I want to be able to trigger webhooks only on explicit host updates

Added by Sebastian Bublitz over 1 year ago. Updated 10 months ago.

Status:
Closed
Priority:
Normal
Category:
Plugin integration
Target version:
-
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

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


Related issues 1 (0 open1 closed)

Precedes Foreman - Bug #36796: Some events are not visible even being triggeredClosedOleh FedorenkoActions
Actions

Also available in: Atom PDF