hi, I''m having difficulty setting up the built-in https report processor and I''m hoping somewhere here can provide some insight. I''ve got a puppet agent and master set up and working correctly, at least as far as I can tell. What I need to do next is get information about any configuration changes made by the master on the agent and send it to an external application. Ideally I would do this by piggy-backing on the puppet reports functionality and just send the yaml reports to a remote REST service. From everything I''ve read this should be doable, even simple. Unfortunately that''s not the case. I''m guessing I''m missing something basic, but I haven''t been able to figure out what This is what I have so far in puppet.conf on the master: [master] report = true reports = store, log, https reporturl = https:// ... So the two things I think I''m missing are 1) how do I handle the cert for the https server 2) what URI(s) do I need to implement on the remote server thanks, Lou -- 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/-/TWjXg_ePqnYJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
I''m not sure there is any https report handler per se. The http report handler should handle both http and https with the 3.0.0 update, so you might try reports = store, log, *http* On Friday, October 12, 2012 11:57:56 AM UTC-7, Lou wrote:> > hi, > > I''m having difficulty setting up the built-in https report processor and > I''m hoping somewhere here can provide some insight. > > I''ve got a puppet agent and master set up and working correctly, at least > as far as I can tell. What I need to do next is get information about any > configuration changes made by the master on the agent and send it to an > external application. Ideally I would do this by piggy-backing on the > puppet reports functionality and just send the yaml reports to a remote > REST service. From everything I''ve read this should be doable, even simple. > Unfortunately that''s not the case. I''m guessing I''m missing something > basic, but I haven''t been able to figure out what > > This is what I have so far in puppet.conf on the master: > > [master] > report = true > reports = store, log, https > reporturl = https:// ... > > So the two things I think I''m missing are > > 1) how do I handle the cert for the https server > > 2) what URI(s) do I need to implement on the remote server > > > thanks, > > Lou > >-- 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/-/FKXsWrVE-GYJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
did try http, and from looking at the code I agree it should do what I want, but still have the same questions about cert and URI(s) On Friday, October 12, 2012 2:23:27 PM UTC-5, Ellison Marks wrote:> > I''m not sure there is any https report handler per se. The http report > handler should handle both http and https with the 3.0.0 update, so you > might try > > reports = store, log, *http* > > On Friday, October 12, 2012 11:57:56 AM UTC-7, Lou wrote: >> >> hi, >> >> I''m having difficulty setting up the built-in https report processor and >> I''m hoping somewhere here can provide some insight. >> >> I''ve got a puppet agent and master set up and working correctly, at least >> as far as I can tell. What I need to do next is get information about any >> configuration changes made by the master on the agent and send it to an >> external application. Ideally I would do this by piggy-backing on the >> puppet reports functionality and just send the yaml reports to a remote >> REST service. From everything I''ve read this should be doable, even simple. >> Unfortunately that''s not the case. I''m guessing I''m missing something >> basic, but I haven''t been able to figure out what >> >> This is what I have so far in puppet.conf on the master: >> >> [master] >> report = true >> reports = store, log, https >> reporturl = https:// ... >> >> So the two things I think I''m missing are >> >> 1) how do I handle the cert for the https server >> >> 2) what URI(s) do I need to implement on the remote server >> >> >> thanks, >> >> Lou >> >>-- 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/-/aCt1Z689VWoJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
As to the certs, I found this in the source, not sure if it actually answers the question, but hope it helps... Any HTTPS requests made using this class will use Puppet''s SSL certificate configuration for their authentication, and Provides some useful error handling for any SSL errors that occur during a request. For the URI... I''m not sure. Won''t it go to whatever you tell it to go to in the reporturl setting? On Friday, October 12, 2012 1:00:35 PM UTC-7, Lou wrote:> > did try http, and from looking at the code I agree it should do what I > want, but still have the same questions about cert and URI(s) > > > On Friday, October 12, 2012 2:23:27 PM UTC-5, Ellison Marks wrote: >> >> I''m not sure there is any https report handler per se. The http report >> handler should handle both http and https with the 3.0.0 update, so you >> might try >> >> reports = store, log, *http* >> >> On Friday, October 12, 2012 11:57:56 AM UTC-7, Lou wrote: >>> >>> hi, >>> >>> I''m having difficulty setting up the built-in https report processor and >>> I''m hoping somewhere here can provide some insight. >>> >>> I''ve got a puppet agent and master set up and working correctly, at >>> least as far as I can tell. What I need to do next is get information about >>> any configuration changes made by the master on the agent and send it to an >>> external application. Ideally I would do this by piggy-backing on the >>> puppet reports functionality and just send the yaml reports to a remote >>> REST service. From everything I''ve read this should be doable, even simple. >>> Unfortunately that''s not the case. I''m guessing I''m missing something >>> basic, but I haven''t been able to figure out what >>> >>> This is what I have so far in puppet.conf on the master: >>> >>> [master] >>> report = true >>> reports = store, log, https >>> reporturl = https:// ... >>> >>> So the two things I think I''m missing are >>> >>> 1) how do I handle the cert for the https server >>> >>> 2) what URI(s) do I need to implement on the remote server >>> >>> >>> thanks, >>> >>> Lou >>> >>>-- 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/-/H4SScEcOLH4J. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
My fix turned out to be that I had to modify http.rb under /usr/lib/ruby/site_ruby/1.8/puppet/reports/ My new version looks like: require ''puppet'' require ''net/http'' require ''net/https'' <== added require ''uri'' Puppet::Reports.register_report(:http) do desc <<-DESC Send report information via HTTP to the `reporturl`. Each host sends its report as a YAML dump and this sends this YAML to a client via HTTP POST. The YAML is the `report` parameter of the request." DESC def process url = URI.parse(Puppet[:reporturl]) req = Net::HTTP::Post.new(url.path) req.body = self.to_yaml req.content_type = "application/x-yaml" # Net::HTTP.new(url.host, url.port).start {|http| # http.request(req) # add these lines to replace the above 2 http = Net::HTTP.new(url.host, url.port) http.use_ssl = true req.basic_auth("username", "password") response = http.start {|http| http.request(req) } end end There''s a more secure way to do this with certificates, I just haven''t gotten there yet. On Friday, October 12, 2012 3:33:08 PM UTC-5, Ellison Marks wrote:> > As to the certs, I found this in the source, not sure if it actually > answers the question, but hope it helps... > > Any HTTPS requests made using this class will use Puppet''s SSL > certificate configuration for their authentication, and > Provides some useful error handling for any SSL errors that occur > during a request. > > For the URI... I''m not sure. Won''t it go to whatever you tell it to go to > in the reporturl setting? > > On Friday, October 12, 2012 1:00:35 PM UTC-7, Lou wrote: >> >> did try http, and from looking at the code I agree it should do what I >> want, but still have the same questions about cert and URI(s) >> >> >> On Friday, October 12, 2012 2:23:27 PM UTC-5, Ellison Marks wrote: >>> >>> I''m not sure there is any https report handler per se. The http report >>> handler should handle both http and https with the 3.0.0 update, so you >>> might try >>> >>> reports = store, log, *http* >>> >>> On Friday, October 12, 2012 11:57:56 AM UTC-7, Lou wrote: >>>> >>>> hi, >>>> >>>> I''m having difficulty setting up the built-in https report processor >>>> and I''m hoping somewhere here can provide some insight. >>>> >>>> I''ve got a puppet agent and master set up and working correctly, at >>>> least as far as I can tell. What I need to do next is get information about >>>> any configuration changes made by the master on the agent and send it to an >>>> external application. Ideally I would do this by piggy-backing on the >>>> puppet reports functionality and just send the yaml reports to a remote >>>> REST service. From everything I''ve read this should be doable, even simple. >>>> Unfortunately that''s not the case. I''m guessing I''m missing something >>>> basic, but I haven''t been able to figure out what >>>> >>>> This is what I have so far in puppet.conf on the master: >>>> >>>> [master] >>>> report = true >>>> reports = store, log, https >>>> reporturl = https:// ... >>>> >>>> So the two things I think I''m missing are >>>> >>>> 1) how do I handle the cert for the https server >>>> >>>> 2) what URI(s) do I need to implement on the remote server >>>> >>>> >>>> thanks, >>>> >>>> Lou >>>> >>>>-- 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/-/TZ6XjEPqtfwJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On 10/13/2012 03:25 AM, Lou wrote:> My fix turned out to be that I had to modify http.rb under > /usr/lib/ruby/site_ruby/1.8/puppet/reports/ My new version looks like: > > require ''puppet'' > require ''net/http'' > require ''net/https'' <== added > require ''uri''Could you maybe open an issue, or if some of the developers read this, could they add the fix to next version? -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.