• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

log-pilot: With log-pilot you can collect logs from docker hosts and send them t ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

log-pilot

开源软件地址:

https://gitee.com/AliyunContainerService/log-pilot

开源软件介绍:

log-pilot

CircleCIGo Report Card

log-pilot is an awesome docker log tool. With log-pilot you can collect logs from docker hosts and send them to your centralized log system such as elasticsearch, graylog2, awsog and etc. log-pilot can collect not only docker stdout but also log file that inside docker containers.

Try it

Prerequisites:

  • docker-compose >= 1.6
  • Docker Engine >= 1.10
# download log-pilot projectgit clone [email protected]:AliyunContainerService/log-pilot.git# build log-pilot imagecd log-pilot/ && ./build-image.sh# quick startcd quickstart/ && ./run

Then access kibana under the tips. You will find that tomcat's has been collected and sended to kibana.

Create index:kibana

Query the logs:kibana

Quickstart

Run pilot

docker run --rm -it \    -v /var/run/docker.sock:/var/run/docker.sock \    -v /etc/localtime:/etc/localtime \    -v /:/host:ro \    --cap-add SYS_ADMIN \    registry.cn-hangzhou.aliyuncs.com/acs/log-pilot:0.9.5-filebeat

Run applications whose logs need to be collected

Open a new terminal, run the application. With tomcat for example:

docker run -it --rm  -p 10080:8080 \    -v /usr/local/tomcat/logs \    --label aliyun.logs.catalina=stdout \    --label aliyun.logs.access=/usr/local/tomcat/logs/localhost_access_log.*.txt \    tomcat

Now watch the output of log-pilot. You will find that log-pilot get all tomcat's startup logs. If you access tomcat with your broswer, access logs in /usr/local/tomcat/logs/localhost_access_log.\*.txt will also be displayed in log-pilot's output.

More Info: Fluentd Plugin and Filebeat Plugin

Feature

  • Support both fluentd plugin and filebeat plugin. You don't need to create new fluentd or filebeat process for every docker container.
  • Support both stdout and log files. Either docker log driver or logspout can only collect stdout.
  • Declarative configuration. You need do nothing but declare the logs you want to collect.
  • Support many log management: elastichsearch, graylog2, awslogs and more.
  • Tags. You could add tags on the logs collected, and later filter by tags in log management.

Build log-pilot

Prerequisites:

  • Go >= 1.6
go get github.com/AliyunContainerService/log-pilotcd $GOPATH/github.com/AliyunContainerService/log-pilot# This will create a new docker image named log-pilot:latest./build-image.sh

Contribute

You are welcome to make new issues and pull reuqests.


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap