From 5dda5ad20604c6bdc35e633b4b3ab4edfe69c689 Mon Sep 17 00:00:00 2001 From: Paulo Tada Date: Thu, 20 Aug 2015 17:34:56 -0300 Subject: [PATCH] Changing rsyslog.conf file to server.conf file --- cookbooks/rsyslog/templates/server/rsyslog.conf.erb | 55 ------------------------------------------------------- cookbooks/rsyslog/templates/server/server.conf.erb | 11 +++++++++++ 2 files changed, 11 insertions(+), 55 deletions(-) delete mode 100644 cookbooks/rsyslog/templates/server/rsyslog.conf.erb create mode 100644 cookbooks/rsyslog/templates/server/server.conf.erb diff --git a/cookbooks/rsyslog/templates/server/rsyslog.conf.erb b/cookbooks/rsyslog/templates/server/rsyslog.conf.erb deleted file mode 100644 index 4c4c3dd..0000000 --- a/cookbooks/rsyslog/templates/server/rsyslog.conf.erb +++ /dev/null @@ -1,55 +0,0 @@ -#### MODULES #### - -# The imjournal module bellow is now used as a message source instead of imuxsock. -$ModLoad imuxsock # provides support for local system logging (e.g. via logger command) -$ModLoad imjournal # provides access to the systemd journal - -# Provides TCP syslog reception -$ModLoad imtcp -$InputTCPServerRun 514 - -#### GLOBAL DIRECTIVES #### - -# Where to place auxiliary files -$WorkDirectory /var/lib/rsyslog - -# Use default timestamp format -$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat - -# Include all config files in /etc/rsyslog.d/ -$IncludeConfig /etc/rsyslog.d/*.conf - -# Turn off message reception via local log socket; -# local messages are retrieved through imjournal now. -$OmitLocalLogging on - -# File to store the position in the journal -$IMJournalStateFile imjournal.state - -#### RULES #### - -# Log anything (except mail) of level info or higher. -# Don't log private authentication messages! -*.info;mail.none;authpriv.none;cron.none /var/log/messages - -# The authpriv file has restricted access. -authpriv.* /var/log/secure - -# Log all the mail messages in one place. -mail.* -/var/log/maillog - -# Log cron stuff -cron.* /var/log/cron - -# Everybody gets emergency messages -*.emerg :omusrmsg:* - -# Save news errors of level crit and higher in a special file. -uucp,news.crit /var/log/spooler - -# Save boot messages also to boot.log -local7.* /var/log/boot.log - -# SPB logs -# Social -if $fromhost-ip=='<%= node['peers']['social']%>' then /var/log/spb/social/social.log \ No newline at end of file diff --git a/cookbooks/rsyslog/templates/server/server.conf.erb b/cookbooks/rsyslog/templates/server/server.conf.erb new file mode 100644 index 0000000..ca7d6ad --- /dev/null +++ b/cookbooks/rsyslog/templates/server/server.conf.erb @@ -0,0 +1,11 @@ +# Setting up dir to storage the logs from SPB env +# Dir to storage Social logs +if $fromhost-ip=='<%= node['peers']['social']%>' then /var/log/spb/social/social.log +# Dir to storage Email logs +if $fromhost-ip=='<%= node['peers']['email']%>' then /var/log/spb/email/email.log +# Dir to storage database logs +if $fromhost-ip=='<%= node['peers']['database']%>' then /var/log/spb/database/database.log +# Dir to storage integration logs +if $fromhost-ip=='<%= node['peers']['integration']%>' then /var/log/spb/integration/integration.log +# Dir to storage reverseproxy logs +if $fromhost-ip=='<%= node['peers']['reverseproxy']%>' then /var/log/spb/reverseproxy/reverseproxy.log -- libgit2 0.21.2