You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using this cookbook (v7.0.1) with Chef (16.5.77), I get the undesired behavior of NGINX logs getting logged twice in syslog and messages because the way the 35-server-per-host.conf.erb template is written.
so it matches both PerHostSyslog and PerHostMessages templates.
I've found a workaround in NGINX, which is set the severity to crit so it gets only logged in syslog, but I don't really know if this is OK (my experience with rsyslog and syslog is very limited).
Would it be possible that the server.rb recipe had the source property set via attribute so we can tune it to match our specific needs? E.g:
diff --git a/recipes/server.rb b/recipes/server.rb
index 7ea0e53..0eeb0bc 100644
--- a/recipes/server.rb+++ b/recipes/server.rb@@ -30,7 +30,7 @@ directory node['rsyslog']['log_dir'] do
end
template "#{node['rsyslog']['config_prefix']}/rsyslog.d/35-server-per-host.conf" do
- source '35-server-per-host.conf.erb'+ source node['rsyslog']['server-per-host-template']
owner node['rsyslog']['config_files']['owner']
group node['rsyslog']['config_files']['group']
mode node['rsyslog']['config_files']['mode']
The text was updated successfully, but these errors were encountered:
Using this cookbook (
v7.0.1
) with Chef (16.5.77
), I get the undesired behavior of NGINX logs getting logged twice insyslog
andmessages
because the way the 35-server-per-host.conf.erb template is written.According to NGINX docs, by default the
severity
is set asinfo
, and in the 35-server-per-host.conf.erb template we can find that:so it matches both PerHostSyslog and PerHostMessages templates.
I've found a workaround in NGINX, which is set the
severity
tocrit
so it gets only logged insyslog
, but I don't really know if this is OK (my experience withrsyslog
andsyslog
is very limited).Would it be possible that the server.rb recipe had the
source
property set via attribute so we can tune it to match our specific needs? E.g:The text was updated successfully, but these errors were encountered: