diff options
author | Adam Leff <adam@leff.co> | 2016-05-18 14:32:33 -0400 |
---|---|---|
committer | Adam Leff <adam@leff.co> | 2016-06-02 15:09:59 -0400 |
commit | e3039ee388b5a5f9dd6a90f74adc9a4bcf1eec8a (patch) | |
tree | 38bbbd424a002884cfa353c6144016cd7e63bd2d /chef-config | |
parent | fe86dd1a371ec3aaaa9b2aff9910602070d5eeac (diff) | |
download | chef-e3039ee388b5a5f9dd6a90f74adc9a4bcf1eec8a.tar.gz |
Creation of the new DataCollector reporter
The DataCollector reporter is a new method for exporting data about your
Chef run. The details of this new feature can be found in
[RFC 077](https://github.com/chef/chef-rfc/blob/master/rfc077-mode-agnostic-data-collection.md).
Using the existing `EventDispatch` mechanics, the DataCollector reporter
collects data about a Chef run (when it starts, when it ends, what
resources were modified, etc.) and then POSTs them to a Data Collector
server URL that can be specified in your Chef configuration.
While similar functionality exists using the `ResourceReporter` and Chef
Reporting, a new implementation was done to decouple the reporting of this
data from requiring the use of a Chef Server (in the case of Chef Reporting),
opening the door to users being able to implement their own webhook-style
receiver to receive these messages and analyze them accordingly.
Diffstat (limited to 'chef-config')
-rw-r--r-- | chef-config/lib/chef-config/config.rb | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/chef-config/lib/chef-config/config.rb b/chef-config/lib/chef-config/config.rb index 502852b648..568467456f 100644 --- a/chef-config/lib/chef-config/config.rb +++ b/chef-config/lib/chef-config/config.rb @@ -796,6 +796,43 @@ module ChefConfig config_context :chefdk do end + # Configuration options for Data Collector reporting. These settings allow + # the user to configure where to send their Data Collector data, what token + # to send, and whether Data Collector should report its findings in client + # mode vs. solo mode. + config_context :data_collector do + # Full URL to the endpoint that will receive our data. If nil, the + # data collector will not run. + # Ex: http://my-data-collector.mycompany.com/ingest + default :server_url, nil + + # An optional pre-shared token to pass as an HTTP header (x-data-collector-token) + # that can be used to determine whether or not the poster of this + # run data should be trusted. + # Ex: some-uuid-here + default :token, nil + + # The Chef mode during which Data Collector is allowed to function. This + # can be used to run Data Collector only when running as Chef Solo but + # not when using Chef Client. + # Options: :solo (for both Solo Legacy Mode and Client Local Mode), :client, :both + default :mode, :both + + # When the Data Collector cannot send the "starting a run" message to + # the Data Collector server, the Data Collector will be disabled for that + # run. In some situations, such as highly-regulated environments, it + # may be more reasonable to prevent Chef from performing the actual run. + # In these situations, setting this value to true will cause the Chef + # run to raise an exception before starting any converge activities. + default :raise_on_failure, false + + # A user-supplied Organization string that can be sent in payloads + # generated by the DataCollector when Chef is run in Solo mode. This + # allows users to associate their Solo nodes with faux organizations + # without the nodes being connected to an actual Chef Server. + default :organization, nil + end + configurable(:http_proxy) configurable(:http_proxy_user) configurable(:http_proxy_pass) |