On Dec 11, 2006, at 7:40 AM, Jean-Christophe Lacaze wrote:
> Hello,
>
> Now that I can run my client with the --silent and --no-client option,
> Id like to centralize the logs on my puppet server and not on my
> puppet
> clients. The problem is that so far I havent found an option to tell
> puppetrun to get the logs back on my server.
>
> Is that possible to do such a thing with puppetrun? (running on v.
> 0.18.4)
Enable reporting on your clients. This is somewhat documented here:
http://reductivelabs.com/projects/puppet/documentation/reference/
reports.html
Basically, just add ''report = true'' to puppetd.conf to enable
it on
the clients. The server will be listening for them by default.
On the server, the default action is just to store the YAML-formatted
report in /var/puppet/reports, but you can choose other reports
pretty easily. If you just want to log the reports, 0.20.* has a
''log'' report that will do exactly that, but you''ll
have to create
your own because I slightly changed the reporting format. Just drop
this code:
require ''puppet''
Puppet::Server::Report.newreport(:log) do |report|
report.logs.each do |log|
Puppet::Log.newmessage(log)
end
end
into lib/puppet/reports/log.rb, and you should be able to specify
''log'' as a report on the server (i.e., set ''reports =
log'' in
puppetmasterd.conf). The above code might need to be modified
slightly; check the existing reports in that directory to verify the
format, and feel free to email me back if you have any problems.
--
I take my children everywhere, but they always find their way back
home.
--Robert Orben
---------------------------------------------------------------------
Luke Kanies | http://reductivelabs.com | http://madstop.com