mveitas / loggly-rsyslog Goto Github PK
View Code? Open in Web Editor NEWChef cookbook to configure rsyslog to send logs to Loggly
License: Apache License 2.0
Chef cookbook to configure rsyslog to send logs to Loggly
License: Apache License 2.0
Your README says Apache 2.0, your recipe files say "All rights reserved - Do Not Redistribute".
Hey,
This recipe depends on rysyslog ~> 1.5.0 and claims to support ubuntu >= 12.04.
Since Ubuntu 13.10 rsyslog no longer uses init.d to manage the service and requires upstart. Chef is unable to restart rsyslog with this recipe on Ubuntu >= 13.10.
A fix was added to the core rsyslog recipe to allow usage of upstart https://tickets.opscode.com/browse/COOK-4126.
Could you update the dependency to use a version of rsyslog that supports upstart?
I tested by changing the dependency to pull the latest version of rsyslog (1.12) and it seems to work okay.
Cheers,
David
Looks like statefiles are deprecated for rsyslog 8. When validating the new config, syslog executes https://github.com/chef-cookbooks/rsyslog/blob/master/recipes/default.rb#L42-L46 and throws a warning, however somehow chef interprets this as a failure.
* execute[validate_config] action run
================================================================================
Error executing action `run` on resource 'execute[validate_config]'
================================================================================
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '1'
---- Begin output of rsyslogd -N 1 -f /etc/rsyslog.conf ----
STDOUT:
STDERR: rsyslogd: version 8.16.0, config validation run (level 1), master config /etc/rsyslog.conf
rsyslogd: error during parsing file /etc/rsyslog.d/99-files.conf, on or before line 9: parameter 'statefile' deprecated but accepted, consider removing or replacing it [v8.16.0 try http://www.rsyslog.com/e/2207 ]
---- End output of rsyslogd -N 1 -f /etc/rsyslog.conf ----
Ran rsyslogd -N 1 -f /etc/rsyslog.conf returned 1
Cookbook Trace:
---------------
/tmp/kitchen/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/runner.rb:41:in `run_action'
Resource Declaration:
---------------------
# In /tmp/kitchen/cache/cookbooks/rsyslog/recipes/default.rb
42: execute 'validate_config' do
43: command "rsyslogd -N 1 -f #{node['rsyslog']['config_prefix']}/rsyslog.conf"
44: action :nothing
45: end
46:
Compiled Resource:
------------------
# Declared in /tmp/kitchen/cache/cookbooks/rsyslog/recipes/default.rb:42:in `from_file'
execute("validate_config") do
action [:nothing]
retries 0
retry_delay 2
default_guard_interpreter :execute
command "rsyslogd -N 1 -f /etc/rsyslog.conf"
backup 5
returns 0
declared_type :execute
cookbook_name "rsyslog"
recipe_name "default"
end
Platform:
---------
x86_64-linux
* service[rsyslog] action restart
- restart service service[rsyslog]
Running handlers:
[2016-08-16T20:27:50+00:00] ERROR: Running exception handlers
Running handlers complete
[2016-08-16T20:27:50+00:00] ERROR: Exception handlers complete
Chef Client failed. 12 resources updated in 11 seconds
[2016-08-16T20:27:50+00:00] FATAL: Stacktrace dumped to /tmp/kitchen/cache/chef-stacktrace.out
[2016-08-16T20:27:50+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2016-08-16T20:27:50+00:00] ERROR: execute[validate_config] (rsyslog::default line 42) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of rsyslogd -N 1 -f /etc/rsyslog.conf ----
STDOUT:
STDERR: rsyslogd: version 8.16.0, config validation run (level 1), master config /etc/rsyslog.conf
rsyslogd: error during parsing file /etc/rsyslog.d/99-files.conf, on or before line 9: parameter 'statefile' deprecated but accepted, consider removing or replacing it [v8.16.0 try http://www.rsyslog.com/e/2207 ]
---- End output of rsyslogd -N 1 -f /etc/rsyslog.conf ----
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.