AliyunContainerService / log-pilot

Collect logs for docker containers
https://yq.aliyun.com/articles/674327
Apache License 2.0
1.43k stars 400 forks source link

log-pilot 有应用日志输出,es 中没有 #338

Open jiangxianliang007 opened 3 years ago

jiangxianliang007 commented 3 years ago
a6785decfe5825536ee9e930f26dd0bb47869ee9b990c67e8905f8-json.log","offset":962,"docker_container":"godwoken-nginx-lb-2","stream":"stdout","prospector":{"type":"log"},"index":"godwoken-backup-web3-nginx","topic":"godwoken-backup-web3-nginx","beat":{"name":"0a74f9664992","hostname":"0a74f9664992","version":"6.1.1"}}{"@timestamp":"2021-09-15T07:41:55.265Z","@metadata":{"beat":"filebeat","type":"doc","version":"6.1.1"},"topic":"godwoken-backup-web3-nginx","docker_container":"godwoken-nginx-lb-2","source":"/host/var/lib/docker/containers/43dc074f96a6785decfe5825536ee9e930f26dd0bb47869ee9b990c67e8905f8/43dc074f96a6785decfe582553
6ee9e930f26dd0bb47869ee9b990c67e8905f8-json.log","offset":1100,"stream":"stdout","beat":{"name":"0a74f9664992","hostname":"0a74f9664992","version":"6.1.1"},"message":"/docker-entrypoint.sh: Configuration complete; ready for start up","prospector":{"type":"log"},"index":"godwoken-backup-web3-nginx"}INFO[170162] try to remove log config bd2e9445ac90f983fda1906dec00ec2f528aa1f06c7bfe2982589ceb92dc63bb.yml 
{"@timestamp":"2021-09-15T07:42:59.253Z","@metadata":{"beat":"filebeat","type":"doc","version":"6.1.1"},"offset":1681,"beat":{"name":"0a74f9664992","hostname":"0a74f9664992","version":"6.1.1"},"source":"/host/var/lib/docker/containers/43dc074f96a6785decfe5825536ee9e930f26dd0bb47869ee9b990c67e8905f8/43dc074f96a6785
decfe5825536ee9e930f26dd0bb47869ee9b990c67e8905f8-json.log","message":"time:2021-09-15T07:42:59+00:00\tstatus:200\trequest_time:0.004\tupstream_addr:172.24.9.22:3100\tupstream_response_time:0.004\tupstream_cache_status:-\tbody_bytes_sent:40\tremote_addr:172.24.9.22\tx-forward-addr:-\thost:172.24.9.22\trequest_method:POST\trequest_uri:/\tprotocol:HTTP/1.1\thttp_referer:-\thttp_user_agent:curl/7.58.0\trequest_body:{\\x22jsonrpc\\x22:\\x222.0\\x22,\\x22method\\x22:\\x22gw_ping\\x22,\\x22params\\x22:[],\\x22id\\x22:2}","prospector":{"type":"log"},"index":"godwoken-backup-web3-nginx","topic":"godwoken-backup-web3-nginx","docker_container":"godwoken-nginx-lb-2","stream":"stdout"}{"@timestamp":"2021-09-15T07:42:59.253Z","@metadata":{"beat":"filebeat","type":"doc","version":"6.1.1"},"stream":"stdout","source":"/host/var/lib/docker/containers/43dc074f96a6785decfe5825536ee9e930f26dd0bb47869ee9b990c67e8905f8/43dc074f96a6785decfe5825536ee9e930f26dd0bb47869ee9b990c67e8905f8-json.log","offset":18
37,"index":"godwoken-backup-web3-nginx","topic":"godwoken-backup-web3-nginx","message":"2021/09/15 07:42:59 [info] 27#27: *1 client 172.24.9.22 closed keepalive connection","prospector":{"type":"log"},"docker_container":"godwoken-nginx-lb-2","beat":{"name":"0a74f9664992","hostname":"0a74f9664992","version":"6.1.1"}}

image

看起来是没有往es里面写入,这个该怎么排查?

jiangxianliang007 commented 3 years ago

image

Zhang21 commented 2 years ago

直接输出到es版本要6才行。建议输出到kafka,再由kafka消费到es。