forked from Normation/rudder
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
157 additions
and
18 deletions.
There are no files selected for viewing
33 changes: 33 additions & 0 deletions
33
rudder-core/src/main/resources/hooks.d/report-received-non-compliant/hook-template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/bin/sh | ||
|
||
# Hooks parameter are passed by environment variable: | ||
# | ||
|
||
# - RUDDER_REPORT_SEVERITY : report severity level (result_error, result_repaired, audit_noncompliant, audit_error, log_warn) | ||
# - RUDDER_REPORT_EXECUTION_DATETIME : date/time (ISO-8601 YYYY-MM-ddTHH:mm:ss.sssZ) when log was writen (node local time) | ||
# - RUDDER_REPORT_RUN_DATETIME : date/time (ISO-8601 YYYY-MM-ddTHH:mm:ss.sssZ) when run for that log started | ||
# - RUDDER_NODE_ID : nodeId | ||
# - RUDDER_NODE_HOSTNAME : node fully qualified hostname | ||
# - RUDDER_REPORT_RULE_ID : rule ID of report | ||
# - RUDDER_REPORT_RULE_NAME : rule human readable name of report | ||
# - RUDDER_REPORT_DIRECTIVE_ID : directive ID of report | ||
# - RUDDER_REPORT_DIRECTIVE_NAME : directive human readable name of report | ||
# - RUDDER_REPORT_TECHNIQUE_ID : technique ID from which the directive is derived | ||
# - RUDDER_REPORT_TECHNIQUE_VERSION : technique version from which the directive is derived | ||
# - RUDDER_REPORT_COMPONENT_NAME : component name (i.e key) in the directive for that report | ||
# - RUDDER_REPORT_COMPONENT_VALUE : component value bound to the component name | ||
# - RUDDER_REPORT_MESSAGE : report message | ||
|
||
# Errors code on hooks are interpreted as follow: | ||
# - 0 : success, no log (appart if debug one) , continue to next hook | ||
# - 1-31 : error , error log in /var/log/rudder/webapp/, stop processing | ||
# - 32-63 : warning, warning log in /var/log/rudder/webapp/, continue to next hook | ||
# - 64-255: reserved for futur use case. Behavior may change without notice. | ||
|
||
# | ||
# Be careful with non-compliant reports hooks. The may impact the performance of the system if | ||
# non-compliant report rate is hight. These hooks should be make to be the most efficient | ||
# possible and should execute asynchronuously. | ||
# | ||
|
||
exit 0 |
33 changes: 33 additions & 0 deletions
33
rudder-core/src/main/resources/hooks.d/report-received-non-compliant/readme.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
= node-post-acceptance | ||
|
||
== When/What ? | ||
|
||
This directory contains hooks executed after a node was successfully accepted. | ||
|
||
Typically, these hooks triggers action on other system, like registering the node | ||
into a monitoring system or into an external CMDB, or to send notification. | ||
|
||
Be careful with non-compliant reports hooks. The may impact the performance of the system if | ||
non-compliant report rate is hight. These hooks should be make to be the most efficient | ||
possible and should execute asynchronuously. | ||
|
||
|
||
== Parameters | ||
|
||
Hooks parameters are passed by environment variable: | ||
|
||
- RUDDER_REPORT_SEVERITY : report severity level (result_error, result_repaired, audit_noncompliant, audit_error, log_warn) | ||
- RUDDER_REPORT_EXECUTION_DATETIME : date/time (ISO-8601 YYYY-MM-ddTHH:mm:ss.sssZ) when log was writen (node local time) | ||
- RUDDER_REPORT_RUN_DATETIME : date/time (ISO-8601 YYYY-MM-ddTHH:mm:ss.sssZ) when run for that log started | ||
- RUDDER_NODE_ID : nodeId | ||
- RUDDER_NODE_HOSTNAME : node fully qualified hostname | ||
- RUDDER_REPORT_RULE_ID : rule ID of report | ||
- RUDDER_REPORT_RULE_NAME : rule human readable name of report | ||
- RUDDER_REPORT_DIRECTIVE_ID : directive ID of report | ||
- RUDDER_REPORT_DIRECTIVE_NAME : directive human readable name of report | ||
- RUDDER_REPORT_TECHNIQUE_ID : technique ID from which the directive is derived | ||
- RUDDER_REPORT_TECHNIQUE_VERSION : technique version from which the directive is derived | ||
- RUDDER_REPORT_COMPONENT_NAME : component name (i.e key) in the directive for that report | ||
- RUDDER_REPORT_COMPONENT_VALUE : component value bound to the component name | ||
- RUDDER_REPORT_MESSAGE : report message | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters