Commit 1428c990 by John Jarvis

using includes for s3 sync

parent 72734c9a
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
{% if COMMON_S3_LOGS -%} {% if COMMON_S3_LOGS -%}
sharedscripts sharedscripts
postrotate postrotate
bash /edx/bin/send-logs-to-s3 "/edx/var/log/!(*tracking*)" s3://{{ COMMON_S3_LOGS_APP_BUCKET }} {% include s3-application.j2 %}
endscript endscript
{% endif -%} {% endif -%}
} }
...@@ -37,17 +37,7 @@ ...@@ -37,17 +37,7 @@
postrotate postrotate
reload rsyslog >/dev/null 2>&1 || true reload rsyslog >/dev/null 2>&1 || true
{% if COMMON_S3_LOGS -%} {% if COMMON_S3_LOGS -%}
# wildcard expansion is fine, brace expansion won't work {% include s3-rsyslog.j2 %}
# http://stackoverflow.com/questions/369145/how-to-glob-variables-in-bash-script
bash /edx/bin/send-logs-to-s3 "/var/log/mail*" s3://{{ COMMON_S3_LOGS_APP_BUCKET }}
bash /edx/bin/send-logs-to-s3 "/var/log/daemon*" s3://{{ COMMON_S3_LOGS_APP_BUCKET }}
bash /edx/bin/send-logs-to-s3 "/var/log/kern*" s3://{{ COMMON_S3_LOGS_APP_BUCKET }}
bash /edx/bin/send-logs-to-s3 "/var/log/auth*" s3://{{ COMMON_S3_LOGS_APP_BUCKET }}
bash /edx/bin/send-logs-to-s3 "/var/log/user*" s3://{{ COMMON_S3_LOGS_APP_BUCKET }}
bash /edx/bin/send-logs-to-s3 "/var/log/lpr*" s3://{{ COMMON_S3_LOGS_APP_BUCKET }}
bash /edx/bin/send-logs-to-s3 "/var/log/cron*" s3://{{ COMMON_S3_LOGS_APP_BUCKET }}
bash /edx/bin/send-logs-to-s3 "/var/log/debug*" s3://{{ COMMON_S3_LOGS_APP_BUCKET }}
bash /edx/bin/send-logs-to-s3 "/var/log/messages*" s3://{{ COMMON_S3_LOGS_APP_BUCKET }}
{% endif -%} {% endif -%}
endscript endscript
} }
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
{% if COMMON_S3_LOGS -%} {% if COMMON_S3_LOGS -%}
sharedscripts sharedscripts
postrotate postrotate
bash /edx/bin/send-logs-to-s3 "/edx/var/log/*tracking*" s3://{{ COMMON_S3_LOGS_TRACKING_BUCKET }} {% include s3-tracking.j2 %}
endscript endscript
{% endif -%} {% endif -%}
......
bash /edx/bin/send-logs-to-s3 "{{ COMMON_LOG_DIR }}/!(*tracking*)" s3://{{ COMMON_S3_LOGS_APP_BUCKET }}
# wildcard expansion is fine, brace expansion won't work
# http://stackoverflow.com/questions/369145/how-to-glob-variables-in-bash-script
bash /edx/bin/send-logs-to-s3 "/var/log/mail*" s3://{{ COMMON_S3_LOGS_APP_BUCKET }}
bash /edx/bin/send-logs-to-s3 "/var/log/daemon*" s3://{{ COMMON_S3_LOGS_APP_BUCKET }}
bash /edx/bin/send-logs-to-s3 "/var/log/kern*" s3://{{ COMMON_S3_LOGS_APP_BUCKET }}
bash /edx/bin/send-logs-to-s3 "/var/log/auth*" s3://{{ COMMON_S3_LOGS_APP_BUCKET }}
bash /edx/bin/send-logs-to-s3 "/var/log/user*" s3://{{ COMMON_S3_LOGS_APP_BUCKET }}
bash /edx/bin/send-logs-to-s3 "/var/log/lpr*" s3://{{ COMMON_S3_LOGS_APP_BUCKET }}
bash /edx/bin/send-logs-to-s3 "/var/log/cron*" s3://{{ COMMON_S3_LOGS_APP_BUCKET }}
bash /edx/bin/send-logs-to-s3 "/var/log/debug*" s3://{{ COMMON_S3_LOGS_APP_BUCKET }}
bash /edx/bin/send-logs-to-s3 "/var/log/messages*" s3://{{ COMMON_S3_LOGS_APP_BUCKET }}
bash /edx/bin/send-logs-to-s3 "{{ COMMON_LOG_DIR }}/*tracking*" s3://{{ COMMON_S3_LOGS_TRACKING_BUCKET }}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment