Commit be277716fde7b053c34922cd62e8717d012f17da

Authored by Paulo Tada
1 parent 4a0f0eaf
Exists in syslog

Separating spb_log template per host machine

cookbooks/rsyslog/templates/host-database/spb_log.conf.erb 0 → 100644
... ... @@ -0,0 +1,2 @@
  1 +# Sending <%= node.name %> logs
  2 +*.* @@<%= node['peers']['monitor'] %>
0 3 \ No newline at end of file
... ...
cookbooks/rsyslog/templates/host-email/spb_log.conf.erb 0 → 100644
... ... @@ -0,0 +1,2 @@
  1 +# Sending <%= node.name %> logs
  2 +*.* @@<%= node['peers']['monitor'] %>
0 3 \ No newline at end of file
... ...
cookbooks/rsyslog/templates/host-integration/spb_log.conf.erb 0 → 100644
... ... @@ -0,0 +1,2 @@
  1 +# Sending <%= node.name %> logs
  2 +*.* @@<%= node['peers']['monitor'] %>
0 3 \ No newline at end of file
... ...
cookbooks/rsyslog/templates/host-monitor/spb_log.conf.erb 0 → 100644
... ... @@ -0,0 +1,15 @@
  1 +# Provides TCP syslog reception
  2 +$ModLoad imtcp
  3 +$InputTCPServerRun 514
  4 +
  5 +# Setting up dir to storage the logs from SPB env
  6 +# Dir to storage Social logs
  7 +if $fromhost-ip=='<%= node['peers']['social']%>' then /var/log/spb/social/social.log
  8 +# Dir to storage Email logs
  9 +if $fromhost-ip=='<%= node['peers']['email']%>' then /var/log/spb/email/email.log
  10 +# Dir to storage database logs
  11 +if $fromhost-ip=='<%= node['peers']['database']%>' then /var/log/spb/database/database.log
  12 +# Dir to storage integration logs
  13 +if $fromhost-ip=='<%= node['peers']['integration']%>' then /var/log/spb/integration/integration.log
  14 +# Dir to storage reverseproxy logs
  15 +if $fromhost-ip=='<%= node['peers']['reverseproxy']%>' then /var/log/spb/reverseproxy/reverseproxy.log
... ...
cookbooks/rsyslog/templates/host-reverseproxy/spb_log.conf.erb 0 → 100644
... ... @@ -0,0 +1,2 @@
  1 +# Sending <%= node.name %> logs
  2 +*.* @@<%= node['peers']['monitor'] %>
0 3 \ No newline at end of file
... ...
cookbooks/rsyslog/templates/host-social/spb_log.conf.erb 0 → 100644
... ... @@ -0,0 +1,2 @@
  1 +# Sending <%= node.name %> logs
  2 +*.* @@<%= node['peers']['monitor'] %>
0 3 \ No newline at end of file
... ...
cookbooks/rsyslog/templates/node/node-integration.conf.erb
... ... @@ -1,14 +0,0 @@
1   -# Node <%= node.name %>
2   -# The following configurations sends the
3   -# files to rsyslog server
4   -
5   -$Modload imfile
6   -# Logs to send
7   -# TODO: add a for to increment 'var log path', 'severity', 'tag', 'facility', 'state file'
8   -$InputFileName 'var log path'
9   -$InputFileTag 'tag'
10   -$InputFileStateFile 'state file' # Be careful, this must be unique
11   -
12   -$InputFileSeverity 'severity'
13   -$InputFileFacility 'facility'
14   -$InputRunFileMonitor
cookbooks/rsyslog/templates/node/node.conf.erb
... ... @@ -1,2 +0,0 @@
1   -# Sending <%= node.name %> logs
2   -*.* @@<%= node['peers']['monitor'] %>
3 0 \ No newline at end of file
cookbooks/rsyslog/templates/server/server.conf.erb
... ... @@ -1,15 +0,0 @@
1   -# Provides TCP syslog reception
2   -$ModLoad imtcp
3   -$InputTCPServerRun 514
4   -
5   -# Setting up dir to storage the logs from SPB env
6   -# Dir to storage Social logs
7   -if $fromhost-ip=='<%= node['peers']['social']%>' then /var/log/spb/social/social.log
8   -# Dir to storage Email logs
9   -if $fromhost-ip=='<%= node['peers']['email']%>' then /var/log/spb/email/email.log
10   -# Dir to storage database logs
11   -if $fromhost-ip=='<%= node['peers']['database']%>' then /var/log/spb/database/database.log
12   -# Dir to storage integration logs
13   -if $fromhost-ip=='<%= node['peers']['integration']%>' then /var/log/spb/integration/integration.log
14   -# Dir to storage reverseproxy logs
15   -if $fromhost-ip=='<%= node['peers']['reverseproxy']%>' then /var/log/spb/reverseproxy/reverseproxy.log