Comments (4)
I figure out this option is not available by now, isn't it?
from rsyslog.
I think it's not available even now.
It's a very tricky thing to figure out, given the permutations of rulesets, and maybe no one's tackled it yet. I'm working on something similar, internally, but I expect it'll be so ugly that I won't want to release it -- even if it DOES work!
Consider writing your own, first as a template and then better as a LWRP or so, and see whether you can get something that's usable, versatile and, ideally, pretty.
from rsyslog.
While we wait for a better solution, here are a couple of workarounds:
To override the rsyslog.conf.erb template from a different cookbook: https://syshero.org/2013-11-22-override-templates-from-third-party-cookbooks-on/
This breaks the DRY principle, since your wrapper cookbook's rsyslog.conf.erb might drift over time.
Here's a horribly hacky way to do it without modifying the template or cookbook (in an attribute rb file):
# The sous-chef rsyslog cookbook doesn't allow the rsyslog.conf.erb file
# from another cookbook to be pointed to by an attribute. :(
# So we're going to do a horrible hack to get the filters loaded
# before the modules
if node['rsyslog'].key?('filter_msg_contains')
override['rsyslog']['preserve_fqdn'] << "\n\n# Filters from attributes. This needs to happen
# before any output modules are loaded so will affect local logging too\n"
node['rsyslog']['filter_msg_contains'].each do |f|
override['rsyslog']['preserve_fqdn'] << ":msg, contains, \"#{f}\" ~\n"
end
end
from rsyslog.
Another option is to pay attention to an attribute that defines a pre-module include directive
from rsyslog.
Related Issues (20)
- rsyslog.conf.erb contains hardcoded values and missing attributes HOT 1
- Cookbook doesn't support package names other than "rsyslog" HOT 2
- Issue supporting multiple remote servers HOT 2
- Remove all search logic HOT 1
- Only want logs, I explicitly ask for in configuration.
- Add Update option HOT 1
- $DirCreateMode override in 35-server-per-host.conf.erb HOT 2
- rsyslog default configuration generated incorrectly on Amazon Linux 2 HOT 3
- /var/log/* has the wrong group on RHEL and friends HOT 2
- remote.conf not removed when remote-servers list becomes empty HOT 5
- Failling spec tests locally and on Travis-CI HOT 3
- Do not hard code the position (49) for the remote config HOT 2
- NGINX logs are logged twice HOT 1
- New TLS driver functionality breaks recipe on RHEL7 hosts HOT 1
- el6 using imjournal and OmitLocalLogging HOT 2
- Chef deprecation error HOT 1
- NoMethodError undefined method `platform_version' for #<Chef::Node::Attribute:0x0000000004678a00>
- Provide a way to eliminate $MaxMessageSize from /etc/rsyslog.conf template HOT 1
- Dependency Dashboard
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rsyslog.