module Chef::DataCollector::RunStartMessage
Public Class Methods
Source
# File lib/chef/data_collector/run_start_message.rb, line 41 def construct_message(data_collector) run_status = data_collector.run_status node = data_collector.node { "chef_server_fqdn" => URI(Chef::Config[:chef_server_url]).host, "entity_uuid" => Chef::Config[:chef_guid], "id" => run_status&.run_id, "message_version" => "1.0.0", "message_type" => "run_start", "node_name" => node&.name || data_collector.node_name, "organization_name" => organization, "run_id" => run_status&.run_id, "source" => solo_run? ? "chef_solo" : "chef_client", "start_time" => run_status&.start_time&.utc&.iso8601, } end
Construct the message payload that is sent to the DataCollector
server at the start of a Chef
run.
@param data_collector [Chef::DataCollector::Reporter] the calling data_collector instance
@return [Hash] A hash containing the run start message data.