- From: KC Braunschweig <
>
- To:
- Subject: [chef] Re: Re: Logging to syslog
- Date: Tue, 19 Jul 2011 11:23:37 -0700
Best info I've seen seems to be in tickets:
http://tickets.opscode.com/browse/CHEF-273
http://tickets.opscode.com/browse/CHEF-1985
Going to be trying this myself soon. Also, you may be interested in
the splunk handler, which I want to play with after syslog is working:
https://github.com/adamhjk/chef_handler_splunk
Please add your experience to the wiki if you get it working.
On Tue, Jul 19, 2011 at 9:16 AM, Eric-Olivier Lamey
<
>
wrote:
>
On Tue, Jul 19, 2011 at 3:13 PM, Oliver Beattie
>
<
>
>
wrote:
>
> I see from the documentation
>
> (http://wiki.opscode.com/display/chef/Chef+Configuration+Settings#ChefConfigurationSettings-logoutput)
>
> that it is possible to log to syslog, but the link that I guess is supposed
>
> to explain how to do so is broken. I'm afraid I'm not a Ruby person so,
>
> while I realise the config file is just Ruby and it's probably a simple
>
> task
>
> to do so, I'm not entirely sure how to do it without a pointer or two, and
>
> this is functionality I couldn't use Chef without (we have to have all our
>
> logs centralised, which obviously is fairly easy to take care of when using
>
> syslog).
>
>
Hi,
>
>
I had a look a while ago and had to dig a little bit to find the
>
solution. I don't have
>
access to the system I configured right now but, if I remember correctly,
>
you
>
have to install the SyslogLogger gem and then modify /etc/chef/client.rb or
>
server.rb to add:
>
>
require 'syslog_logger'
>
log_location SyslogLogger.new("chef-client")
>
>
If you are using the supplied startup scripts for RedHat-base
>
distributions, please
>
note that they insist on configuring the logger in
>
/etc/sysconfig/chef-{client,server}.
>
You might have to manually modify the startup script for the logging to
>
work
>
as intended.
>
Archive powered by MHonArc 2.6.16.