Put remote logs only in all.log when using rsyslog server
This commit is contained in:
parent
f17eacf99a
commit
e6c709a9c2
2 changed files with 14 additions and 8 deletions
|
@ -331,8 +331,8 @@ class syslog::standalone inherits syslog::common::standalone {
|
||||||
class syslog::standalone::syslogd inherits syslog::client::syslogd {
|
class syslog::standalone::syslogd inherits syslog::client::syslogd {
|
||||||
|
|
||||||
File["/etc/syslog.conf"] {
|
File["/etc/syslog.conf"] {
|
||||||
content => template("syslog/syslog.conf.$operatingsystem.erb",
|
content => template("syslog/syslog.conf.server.erb",
|
||||||
"syslog/syslog.conf.server.erb"),
|
"syslog/syslog.conf.$operatingsystem.erb"),
|
||||||
require => [ File["/srv/log"],
|
require => [ File["/srv/log"],
|
||||||
File["/var/log/all.log"], ],
|
File["/var/log/all.log"], ],
|
||||||
}
|
}
|
||||||
|
@ -346,8 +346,8 @@ class syslog::standalone::rsyslog inherits syslog::client::rsyslog {
|
||||||
|
|
||||||
File["/etc/rsyslog.conf"] {
|
File["/etc/rsyslog.conf"] {
|
||||||
content => template("syslog/rsyslog.conf.erb",
|
content => template("syslog/rsyslog.conf.erb",
|
||||||
"syslog/syslog.conf.$operatingsystem.erb",
|
"syslog/syslog.conf.server.erb",
|
||||||
"syslog/syslog.conf.server.erb"),
|
"syslog/syslog.conf.$operatingsystem.erb"),
|
||||||
require => [ File["/srv/log"],
|
require => [ File["/srv/log"],
|
||||||
File["/var/log/all.log"], ],
|
File["/var/log/all.log"], ],
|
||||||
}
|
}
|
||||||
|
@ -375,8 +375,8 @@ class syslog::server::rsyslog inherits syslog::client::rsyslog {
|
||||||
File["/etc/rsyslog.conf"] {
|
File["/etc/rsyslog.conf"] {
|
||||||
content => template("syslog/rsyslog.conf.erb",
|
content => template("syslog/rsyslog.conf.erb",
|
||||||
"syslog/rsyslog.conf.server.erb",
|
"syslog/rsyslog.conf.server.erb",
|
||||||
"syslog/syslog.conf.$operatingsystem.erb",
|
"syslog/syslog.conf.server.erb",
|
||||||
"syslog/syslog.conf.server.erb"),
|
"syslog/syslog.conf.$operatingsystem.erb"),
|
||||||
require => [ File["/srv/log"],
|
require => [ File["/srv/log"],
|
||||||
File["/var/log/all.log"], ],
|
File["/var/log/all.log"], ],
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,9 @@
|
||||||
|
# Everything goes here
|
||||||
|
*.* /srv/log/all.log
|
||||||
|
mark.* /srv/log/all.log
|
||||||
|
|
||||||
*.* /srv/log/all.log
|
<% if syslog_type == "rsyslog" -%>
|
||||||
mark.* /srv/log/all.log
|
# Remote logs only go in all.log
|
||||||
|
:fromhost-ip, !isequal, "127.0.0.1" ~
|
||||||
|
|
||||||
|
<% end -%>
|
||||||
|
|
Loading…
Add table
Reference in a new issue