Sign inSign up

eason02/filebeat-alpine

By eason02

•Updated over 7 years ago

Filebeat with alpine version, more tiny, more lighter

Image
2

5.9K

eason02/filebeat-alpine repository overview

⁠Why to use filebeat-alpine⁠

filebeat with alpine, more tiny, more lighter, only 16M disk cost.

⁠Certainly, you have better to clone this git to your local for convenience.
git clone https://github.com/easonlau02/filebeat-alpine.git
⁠Something to know when using eason02/filebeat-alpine⁠
  1. Make sure your application log path need to follow below or link to below path.
PATH/application/logs/*.log
  1. And change docker-compose file⁠
volumes:
  - PATH:/home/user/ 

Will auto-scan your log folder by this path: PATH/*/logs/*.log

  1. Run via docker-compose
docker-compose up -d
  1. docker ps | grep filebeat-alpine
CONTAINER ID        IMAGE                           COMMAND                  CREATED             STATUS              PORTS               NAMES
8b7a1d8a35c0        eason02/filebeat-alpine:5.3.1   "filebeat -e filebeat"   18 seconds ago      Up 17 seconds                           filebeat-alpine-5.3.1

⁠为什么使用 filebeat-alpine⁠

结合微服务和容器化的思想,将无关的、无用的资源去掉,封装成一个单一,纯净的image镜像,使用当前最轻量级的OS-alpine来封装filebeat,更轻量级,大小只有16M左右,方便快速启动

⁠当然,建议你将本git folder clone到你的本地方便后面启动service
git clone https://github.com/easonlau02/filebeat-alpine.git
⁠使用eason02/filebeat-alpine⁠,一些你需要配置的properties
  1. 确保你的日志文件在如下的路径格式中,其中PATH需要做docker-compose配置的,application这一层可以有很多的app name,每个app folder下面有一个叫做logs的folder,然后下面才是具体的*.log文件
PATH/application/logs/*.log
  1. 用上面的PATH来修改 docker-compose file⁠
volumes:
  - PATH:/home/user/ 

filebeat会通过如下的路径自动扫描日志: PATH/*/logs/*.log

  1. 使用docker-compose启动
docker-compose up -d
  1. docker ps | grep filebeat-alpine
CONTAINER ID        IMAGE                           COMMAND                  CREATED             STATUS              PORTS               NAMES
8b7a1d8a35c0        eason02/filebeat-alpine:5.3.1   "filebeat -e filebeat"   18 seconds ago      Up 17 seconds                           filebeat-alpine-5.3.1

Tag summary

Content type

Image

Digest

Size

26.5 MB

Last updated

over 7 years ago

docker pull eason02/filebeat-alpine