Project

General

Profile

Actions

User story #8353

closed

Implement notifications for different server-side actions and events (hooks)

Added by Janos Mattyasovszky almost 8 years ago. Updated about 7 years ago.

Status:
Released
Priority:
N/A
Category:
Server components
Target version:
UX impact:
Suggestion strength:
User visibility:
Effort required:
Name check:
Fix check:
Regression:

Description

It would be good to have the ability to implement server-side hook on different events on the rudder server(s).

Example:
- Auto-Accept/Deny nodes if they meet a specific criteria
- Create a node-specific file and extend the private-folder of a node (#8352)

This could be enabled by having a hooks.d directory, which executes all binary files inside the hook_name (when it exists):

/opt/rudder/hooks.d/:
 -> policy-generation-started/
 -> policy-generation-finished/
 -> node-policy-generated/
 -> node-non-compliant/
 -> inventory-first-received/
 -> inventory-updated/

This would allow to introduce new hook, and add a easy way for the sysadmins to set up additional actions when things happen.

You could add information in env.vars (RUDDER_*) to the binary being run, so one would know like RUDDER_NODE_UUID.


Subtasks 8 (0 open8 closed)

Bug #9843: Broken policy generation in Rudder 4.1ReleasedAlexis Mousset2016-12-22Actions
Bug #9862: Generation hooks are not packagedReleasedBenoît PECCATTE2016-12-28Actions
User story #9865: Move hooks to /opt/rudder/etc/ReleasedVincent MEMBRÉ2016-12-28Actions
User story #9883: Hook execution logs should not be displayed in default verbosity ReleasedNicolas CHARLES2017-01-02Actions
Bug #9950: Policy generation fails in 4.1 with 'kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]'ReleasedVincent MEMBRÉ2017-01-11Actions
User story #10195: Document server-side hooksRejectedAlexis MoussetActions
Bug #10200: Change readme layout for HooksReleasedAlexis MoussetActions
Bug #10201: Use readme from hooks to build rudder doc chapter on themReleasedBenoît PECCATTEActions

Related issues 6 (1 open5 closed)

Related to Rudder - User story #8352: Create a per-node private-folder for file distribution to each nodeNewActions
Related to Rudder - User story #6562: Have a hook to run a command on non complianceRejectedActions
Related to Rudder - Bug #9704: As for Rudder 3.2.9, promises calculation is still too slowRejectedActions
Related to Rudder - Bug #9863: Hook execution logs should not be displayed in default verbosityRejected2016-12-28Actions
Related to Rudder - User story #10568: Create a hook for pre and post node deletion eventReleasedFrançois ARMANDActions
Related to Rudder - User story #10724: adding a Hook after node validationRejectedActions
Actions

Also available in: Atom PDF