Julien,
Thanks, this solved the issue for me.

We had the puppet dashboard running on a separate host to the Puppet 
masters. The puppet masters were trying to send the reports to the 
Dashboard using HTTP when the dashboard comes configured for HTTPS. So I 
copied the /opt/puppet/lib/ruby/site_ruby/1.8/puppet/reports/https.rb file 
(path may different for other people) from the dashboard host to the puppet 
masters and changed puppet.conf report settings to HTTPS and then it worked 
perfectly.

Cheers,
Cosmo

On Wednesday, July 4, 2012 2:13:49 PM UTC+1, Julien wrote:
>
> Hi,
>
> In your puppet.conf, change :
>
> [master]
>   reports = log, store, http*s*
>   reporturl = 
> https://puppet-test.uis.example.com:443/reports/upload<https://puppet-test.uis.example.com/reports/upload>
>
> Then add in your reports folder (under debian with puppetlabs packets) ;
>
> /usr/lib/ruby/1.8/puppet/reports/https.rb :
>
> require 'puppet'
> require 'net/http'
> require 'net/https'
> require 'uri'
>
> Puppet::Reports.register_report(:https) do
>
>   desc <<-DESC
>   Send report information via HTTPS to the `reporturl`. Each host sends
>   its report as a YAML dump and this sends this YAML to a client via HTTPS 
> POST.
>   The YAML is the `report` parameter of the request."
>   DESC
>
>   def process
>     url = URI.parse(Puppet[:reporturl].to_s)
>     http = Net::HTTP.new(url.host, url.port)
>     http.use_ssl = true
>     http.verify_mode = OpenSSL::SSL::VERIFY_NONE
>
>     req = Net::HTTP::Post.new(url.path)
>     req.body = self.to_yaml
>     req.content_type = "application/x-yaml"
>
>     http.start do |http|
>       response = http.request(req)
>       unless response.code == "200"
>         Puppet.err "Unable to submit report to #{Puppet[:reporturl].to_s} 
> [#{response.code}] #{response.msg}" 
>       end
>     end
>
>   end
> end
>
> Found in the VM Labs shipped by puppetlabs.
>
> Julien
>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/YyTdCP-eJFgJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to