Skip to content

Commit

Permalink
update filebeat plugin and test example
Browse files Browse the repository at this point in the history
  • Loading branch information
chenqz1987 committed Jul 25, 2018
1 parent 1ba208a commit b213444
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Dockerfile.filebeat
Expand Up @@ -11,7 +11,7 @@ RUN go install

FROM alpine:3.6

ENV FILEBEAT_VERSION=6.1.1-2
ENV FILEBEAT_VERSION=6.1.1-3
COPY assets/glibc/glibc-2.26-r0.apk /tmp/
RUN apk update && \
apk add python && \
Expand Down
3 changes: 3 additions & 0 deletions assets/filebeat/config.filebeat
Expand Up @@ -30,6 +30,9 @@ filebeat.registry_file: /var/lib/filebeat/registry
filebeat.shutdown_timeout: ${FILEBEAT_SHUTDOWN_TIMEOUT:-0}
logging.level: ${FILEBEAT_LOG_LEVEL:-info}
logging.metrics.enabled: ${FILEBEAT_METRICS_ENABLED:-false}
logging.files.rotateeverybytes: ${FILEBEAT_LOG_MAX_SIZE:-104857600}
logging.files.keepfiles: ${FILEBEAT_LOG_MAX_FILE:-10}
logging.files.permissions: ${FILEBEAT_LOG_PERMISSION:-0600}
${FILEBEAT_MAX_PROCS:+max_procs: ${FILEBEAT_MAX_PROCS}}
setup.template.name: "${FILEBEAT_INDEX:-filebeat}"
setup.template.pattern: "${FILEBEAT_INDEX:-filebeat}-*"
Expand Down
10 changes: 10 additions & 0 deletions quickstart/filebeat/busybox.yml
@@ -0,0 +1,10 @@
busybox:
image: busybox
restart: always
labels:
aliyun.logs.busybox: stdout
aliyun.logs.busybox.tags: app=busybox,stage=test
command: ['ping', 'localhost']
log_opt:
max-size: '10k'
max-file: '2'
2 changes: 2 additions & 0 deletions quickstart/filebeat/run
Expand Up @@ -46,10 +46,12 @@ done
blue "\nCleanup"
docker-compose -p tomcat -f tomcat.yml down
docker-compose -p tomcat2 -f tomcat2.yml down
#docker-compose -p busybox -f busybox.yml down

blue "Starting tomcat"
docker-compose -p tomcat -f tomcat.yml up -d
docker-compose -p tomcat2 -f tomcat2.yml up -d
#docker-compose -p busybox -f busybox.yml up -d

pwd=$(pwd)
project=$(basename $pwd)
Expand Down
2 changes: 1 addition & 1 deletion quickstart/filebeat/tomcat.yml
Expand Up @@ -4,7 +4,7 @@ tomcat:
- "8080"
restart: always
volumes:
- /tmp/tomcat:/usr/local/tomcat/logs
- /tomcat:/usr/local/tomcat/logs
labels:
aliyun.logs.catalina: stdout
aliyun.logs.catalina.tags: app=tomcat,stage=test
Expand Down
2 changes: 1 addition & 1 deletion quickstart/filebeat/tomcat2.yml
Expand Up @@ -4,7 +4,7 @@ tomcat2:
- "8080"
restart: always
volumes:
- /tmp/tomcat:/usr/local/tomcat/logs
- /tomcat:/usr/local/tomcat/logs
labels:
aliyun.logs.catalina: stdout
aliyun.logs.catalina.tags: app=tomcat2,stage=test
Expand Down

0 comments on commit b213444

Please sign in to comment.