config fluentd to buffer logs for 10s before sending to loggly

This commit is contained in:
2018-04-12 06:40:40 -04:00
parent 4e521cdee5
commit cfa19949b6
4 changed files with 43 additions and 17 deletions

View File

@@ -21,4 +21,4 @@ RUN chmod +x -R /etc/periodic/
# Run the command on container startup # Run the command on container startup
#CMD cron && tail -f /var/log/cron.log #CMD cron && tail -f /var/log/cron.log
#CMD tail -f /var/log/cron.log #CMD tail -f /var/log/cron.log
ENTRYPOINT crond -d 2 -f ENTRYPOINT crond -d 8 -f

View File

@@ -1,3 +1,3 @@
#!/bin/sh #!/bin/sh
curl -Ss --connect-timeout 2 https://xaibox.xai-corp.net/cron.php curl -Ss --connect-timeout 2 https://xaibox.xai-corp.net/cron.php > /dev/null

View File

@@ -34,4 +34,4 @@ services:
resources: resources:
limits: limits:
cpus: '1' cpus: '1'
memory: 64M memory: 128M

View File

@@ -12,65 +12,91 @@
<match nextcloud> <match nextcloud>
@type loggly @type loggly
loggly_url https://logs-01.loggly.com/inputs/22feaabc-c080-4407-86c3-ae9052999786/tag/nextcloud loggly_url https://logs-01.loggly.com/bulk/22feaabc-c080-4407-86c3-ae9052999786/tag/nextcloud
buffer_type memory
flush_interval 10s
</match> </match>
<match gitea> <match gitea>
@type loggly @type loggly
loggly_url https://logs-01.loggly.com/inputs/22feaabc-c080-4407-86c3-ae9052999786/tag/gitea loggly_url https://logs-01.loggly.com/bulk/22feaabc-c080-4407-86c3-ae9052999786/tag/gitea
buffer_type memory
flush_interval 10s
</match> </match>
<match dkui> <match dkui>
@type loggly @type loggly
loggly_url https://logs-01.loggly.com/inputs/22feaabc-c080-4407-86c3-ae9052999786/tag/dkui loggly_url https://logs-01.loggly.com/bulk/22feaabc-c080-4407-86c3-ae9052999786/tag/dkui
buffer_type memory
flush_interval 10s
</match> </match>
<match cron> <match cron>
@type loggly @type loggly
loggly_url https://logs-01.loggly.com/inputs/22feaabc-c080-4407-86c3-ae9052999786/tag/cron loggly_url https://logs-01.loggly.com/bulk/22feaabc-c080-4407-86c3-ae9052999786/tag/cron
buffer_type memory
flush_interval 10s
</match> </match>
<match datadog> <match datadog>
@type loggly @type loggly
loggly_url https://logs-01.loggly.com/inputs/22feaabc-c080-4407-86c3-ae9052999786/tag/datadog loggly_url https://logs-01.loggly.com/bulk/22feaabc-c080-4407-86c3-ae9052999786/tag/datadog
buffer_type memory
flush_interval 10s
</match> </match>
<match memcached> <match memcached>
@type loggly @type loggly
loggly_url https://logs-01.loggly.com/inputs/22feaabc-c080-4407-86c3-ae9052999786/tag/memcached loggly_url https://logs-01.loggly.com/bulk/22feaabc-c080-4407-86c3-ae9052999786/tag/memcached
buffer_type memory
flush_interval 10s
</match> </match>
<match mariadb> <match mariadb>
@type loggly @type loggly
loggly_url https://logs-01.loggly.com/inputs/22feaabc-c080-4407-86c3-ae9052999786/tag/portainer loggly_url https://logs-01.loggly.com/bulk/22feaabc-c080-4407-86c3-ae9052999786/tag/portainer
buffer_type memory
flush_interval 10s
</match> </match>
<match dkregistry> <match dkregistry>
@type loggly @type loggly
loggly_url https://logs-01.loggly.com/inputs/22feaabc-c080-4407-86c3-ae9052999786/tag/dkregistry loggly_url https://logs-01.loggly.com/bulk/22feaabc-c080-4407-86c3-ae9052999786/tag/dkregistry
buffer_type memory
flush_interval 10s
</match> </match>
<match postgres> <match postgres>
@type loggly @type loggly
loggly_url https://logs-01.loggly.com/inputs/22feaabc-c080-4407-86c3-ae9052999786/tag/postgres loggly_url https://logs-01.loggly.com/bulk/22feaabc-c080-4407-86c3-ae9052999786/tag/postgres
buffer_type memory
flush_interval 10s
</match> </match>
<match minio> <match minio>
@type loggly @type loggly
loggly_url https://logs-01.loggly.com/inputs/22feaabc-c080-4407-86c3-ae9052999786/tag/minio loggly_url https://logs-01.loggly.com/bulk/22feaabc-c080-4407-86c3-ae9052999786/tag/minio
buffer_type memory
flush_interval 10s
</match> </match>
<match redis> <match redis>
@type loggly @type loggly
loggly_url https://logs-01.loggly.com/inputs/22feaabc-c080-4407-86c3-ae9052999786/tag/redis loggly_url https://logs-01.loggly.com/bulk/22feaabc-c080-4407-86c3-ae9052999786/tag/redis
buffer_type memory
flush_interval 10s
</match> </match>
<match sslproxy> <match sslproxy>
@type loggly @type loggly_buffered
loggly_url https://logs-01.loggly.com/inputs/22feaabc-c080-4407-86c3-ae9052999786/tag/sslproxy loggly_url https://logs-01.loggly.com/bulk/22feaabc-c080-4407-86c3-ae9052999786/tag/sslproxy
buffer_type memory
flush_interval 10s
</match> </match>
<match **> <match **>
@type loggly @type loggly
loggly_url https://logs-01.loggly.com/inputs/22feaabc-c080-4407-86c3-ae9052999786/tag/fluentd loggly_url https://logs-01.loggly.com/bulk/22feaabc-c080-4407-86c3-ae9052999786/tag/fluentd
buffer_type memory
flush_interval 10s
</match> </match>