summaryrefslogtreecommitdiff
path: root/lib/chef/client.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/client.rb')
-rw-r--r--lib/chef/client.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/chef/client.rb b/lib/chef/client.rb
index 054b284bd5..c857da1b93 100644
--- a/lib/chef/client.rb
+++ b/lib/chef/client.rb
@@ -45,6 +45,7 @@ require "chef/formatters/doc"
require "chef/formatters/minimal"
require "chef/version"
require "chef/resource_reporter"
+require "chef/data_collector"
require "chef/audit/audit_reporter"
require "chef/run_lock"
require "chef/policy_builder"
@@ -263,6 +264,7 @@ class Chef
run_ohai
register unless Chef::Config[:solo_legacy_mode]
+ register_data_collector_reporter
load_node
@@ -957,6 +959,12 @@ class Chef
Chef::ReservedNames::Win32::Security.has_admin_privileges?
end
+
+ # Register the data collector reporter to send event information to the
+ # data collector server
+ def register_data_collector_reporter
+ events.register(Chef::DataCollector::Reporter.new) if Chef::DataCollector.register_reporter?
+ end
end
end