Permalink
Browse files

Clarify how to exclude promises from being reported by enterprise com…

…ponents

(cherry picked from commit 01ec7d4)
  • Loading branch information...
1 parent a9f08f8 commit 6cfe98bb3f95c1e64249dbcebc2a7bdd27ca2886 @nickanderson nickanderson committed Feb 16, 2017
Showing with 75 additions and 27 deletions.
  1. +43 −1 guide/reporting/command-line-reports.markdown
  2. +32 −26 reference/promise-types/access.markdown
@@ -17,6 +17,8 @@ The following report topics are included:
[Including data in reports][Command-Line Reports#Including data in reports]
+[Excluding data from reports][Command-Line Reports#Excluding data from reports]
+
[Creating custom logs][Command-Line Reports#Creating custom logs]
[Redirecting output to logs][Command-Line Reports#Redirecting output to logs]
@@ -261,6 +263,46 @@ R: bin:x:1:1:bin:/bin:/bin/bash
R: daemon:x:2:2:Daemon:/sbin:/bin/bash
```
+### Excluding data from reports
+
+CFEngine generates information internally that you might want exclude from
+reports. Any promise outcome can be excluded from report collection based on its
+handle. `vars` and `classes` type promises can be excluded using its handle
+**or** by meta tag.
+
+```cf3
+bundle agent main
+{
+ files:
+
+ linux::
+
+ "/var/log/noisy.log"
+ handle => "noreport_noisy_log_rotation",
+ rename => rotate(5);
+}
+
+body report_data_select default_data_select_policy_hub
+# @brief Data to collect from policy servers by default
+#
+# By convention variables and classes known to be internal, (having no
+# reporting value) should be prefixed with an underscore. By default the policy
+# framework explicitly excludes these variables and classes from collection.
+{
+ # Collect all classes or vars tagged with `inventory` or `report`
+ metatags_include => { "inventory", "report" };
+
+ # Exclude any classes or vars tagged with `noreport`
+ metatags_exclude => { "noreport" };
+
+ # Exclude any promise with handle matching `noreport_.*` from report collection.
+ promise_handle_exclude => { "noreport_.*" };
+
+ # Include all metrics from cf-monitord
+ monitoring_include => { ".*" };
+}
+```
+
### Creating custom logs
Logs can be attached to any promise. In this example, an executed shell command logs a
@@ -411,4 +453,4 @@ Sat Dec 5 18:20:45 2013 /tmp/testfile
These reports are generated automatically in Enterprise, and are integrated into the
web-browsable knowledge map. Community edition users must extract the data and create
-these themselves.
+these themselves.
@@ -446,13 +446,14 @@ Here are the built-in `report_data_select` bodies `default_data_select_host()` a
#### metatags_exclude
-**Description:** List of [anchored][anchored] regular expressions matching metatags
-to exclude from reporting.
+**Description:** List of [anchored][anchored] regular expressions matching
+metatags of classes or vars to exclude from reporting.
-Classes and variables with metatags matching any entry of that list will not be reported
-to the CFEngine Enterprise server.
+Classes and variables with metatags matching any entry of that list will not be
+reported to the CFEngine Enterprise server.
-When combined with `metatags_include`, this list is applied to the selected subset.
+When combined with `metatags_include`, this list is applied to the selected
+subset.
[%CFEngine_promise_attribute()%]
@@ -462,13 +463,14 @@ When combined with `metatags_include`, this list is applied to the selected subs
#### metatags_include
-**Description:** List of [anchored][anchored] regular expressions matching metatags
-to include in reporting.
+**Description:** List of [anchored][anchored] regular expressions matching
+metatags of classes or vars to include in reporting.
-Classes and variables with metatags matching any entry of that list will be reported
-to the CFENgine Enterprise server.
+Classes and variables with metatags matching any entry of that list will be
+reported to the CFENgine Enterprise server.
-When combined with `metatags_exclude`, the exclude list is applied to the subset from this list.
+When combined with `metatags_exclude`, the exclude list is applied to the subset
+from this list.
[%CFEngine_promise_attribute()%]
@@ -478,13 +480,14 @@ When combined with `metatags_exclude`, the exclude list is applied to the subset
#### promise_handle_exclude
-**Description:** List of [anchored][anchored] regular expressions matching promise handles
-to exclude from reporting.
+**Description:** List of [anchored][anchored] regular expressions matching
+promise handles to exclude from reporting.
-Information about promises with handles that match any entry in that list will not be reported
-to the CFEngine Enterprise server.
+Information about promises with handles that match any entry in that list will
+not be reported to the CFEngine Enterprise server.
-When combined with `promise_handle_include`, this list is applied to the selected subset.
+When combined with `promise_handle_include`, this list is applied to the
+selected subset.
[%CFEngine_promise_attribute()%]
@@ -494,13 +497,14 @@ When combined with `promise_handle_include`, this list is applied to the selecte
#### promise_handle_include
-**Description:** List of [anchored][anchored] regular expressions matching promise handles
-to include in reporting.
+**Description:** List of [anchored][anchored] regular expressions matching
+promise handles to include in reporting.
-Information about promises with handles that match any entry in that list will be reported
-to the CFEngine Enterprise server.
+Information about promises with handles that match any entry in that list will
+be reported to the CFEngine Enterprise server.
-When combined with `promise_handle_exclude`, the exclude list is applied to the subset from this list.
+When combined with `promise_handle_exclude`, the exclude list is applied to the
+subset from this list.
[%CFEngine_promise_attribute()%]
@@ -510,13 +514,14 @@ When combined with `promise_handle_exclude`, the exclude list is applied to the
#### monitoring_include
-**Description:** List of [anchored][anchored] regular expressions matching monitoring objects
-to include in reporting.
+**Description:** List of [anchored][anchored] regular expressions matching
+monitoring objects to include in reporting.
Monitoring objects with names matching any entry in that list will be reported
to the CFEngine Enterprise server.
-When combined with `monitoring_exclude`, the exclude list is applied to the subset from this list.
+When combined with `monitoring_exclude`, the exclude list is applied to the
+subset from this list.
[%CFEngine_promise_attribute()%]
@@ -529,10 +534,11 @@ When combined with `monitoring_exclude`, the exclude list is applied to the subs
**Description:** List of [anchored][anchored] regular expressions matching monitoring objects
to exclude from reporting.
-Monitoring objects with names matching any entry in that list will not be reported
-to the CFEngine Enterprise server.
+Monitoring objects with names matching any entry in that list will not be
+reported to the CFEngine Enterprise server.
-When combined with `monitoring_include`, this list is applied to the selected subset.
+When combined with `monitoring_include`, this list is applied to the selected
+subset.
[%CFEngine_promise_attribute()%]

0 comments on commit 6cfe98b

Please sign in to comment.