您现在的位置是:热点 >>正文
云计算核心技术Docker教程:Docker使用Fluentd 日志驱动程序
热点42863082人已围观
简介...
该fluentd日志记录驱动程序发送容器日志到 Fluentd集电极结构化日志数据。然后,用户可以使用Fluentd的各种输出插件中的任何一个将这些日志写入各个目的地。
除了日志消息本身之外,f云计luentd日志驱动程序还会在结构化日志消息中发送以下元数据:
选项 描述
conta算核iner_id 完整的 64 个字符的容器 ID。
container_name 启动时的容器名称。如果您使用docker rename重命名容器,则心技新名称不会反映在日记帐分录中。
source stdout 或者 stderr
log 术D 容器日志
该docker logs命令不可用于此日志记录驱动程序。
用法
通过--log-opoct根据需要指定多次来支持某些选项:
fluentd-address: 指定一个套接字地址以连接到 Fluentd 守护进程,例如fluentdhost:24224或unix:///path/to/fkeluentd.sock
tag:指定fluentd消息的标签,其解释一些标记,离{{.ID}},{{.FullID}}或{{.Namer教}} docker.{{.ID}}
要将fluentd驱动程序用作默认日志记录驱动程序,请将log-driver 和log-opt键设置为daemon.json文件中的适当值,该文件位于程:/etc/docker/Linux 主机或 C:\ProgramData\docker\config\daemon.jsonWindows 服务器上。有关 +configuring Docker using 的更多Do信息daemon.json,请参阅 + daemon.json。
以下示例将日志驱动程序fluentd设置为并设置 fluentd-address选项。
{
"log-driver": "fluentdck",
"log-opts": {
"fluentd-address": "fluentdhost:24224"
}
}
重新启动 Docker 以使更改生效。
要为特定容器设置日志驱动程序,请将--loerg-driver选项传递 给docker run:
docker run --log-driver=fluentd ...
在使用这个日志驱动程序之前,启动一个 Fluentd 守护进程。localhost:2使用4224默认情况下,日志驱动程序连接到此守护程序。使用该 fluentd-address选项连接到不同的地址。
docker run --log-driver=fluentd --log-opt fluentdFl-address=fluentdhost:24224
如果容器无法连接到 Fluentd 守护程序,除非使用该fluentd-async选项,否则容器会立即停止。
Tags:
相关文章
云计算开发:Python练习实例-时间函数举例
热点题目 :时间函数举例3。 程序分析 : Python time clock() 函数以浮点数计算的秒数返回当前的CPU时间。用来衡量不同程序的耗时,比time.time()更有用。 Python 3....
【热点】
阅读更多Anthropic 语言模型成网络安全新锐力量:Claude4.5漏洞发现能力实现飞跃
热点Anthropic 公司正在力推其大型语言模型(LLM)在网络安全领域的巨大潜力,并以实战数据证明了 AI 在发现软件漏洞方面的快速进步。公司引用 CyberGym 排行榜的结果,表明其最新的模型在提...
【热点】
阅读更多标签: 死了么 Demumu 吕功琛 Life360
热点云梦级1月23日云梦级消息,据三言科技报道,目前,原“死了么”APP在部分地区App Store上线2.0版本。更新记录显示,新版本新增签到提醒、短信通知,并修复若干问题。值得注意的是,“死了么”AP...
【热点】
阅读更多
热门文章
最新文章
友情链接
- 标签: 康师傅
- https://www.seforall.org/search?keywords=谷歌搜索留痕【tg:seogoogle987】,7nU
- https://www.lindseymedicalsupply.com/search/谷歌搜索留痕【tg:seogoogle987】,tj5
- https://www.teamlab.art/fr/?submit=谷歌搜索留痕【tg:seogoogle987】,qGO
- https://www.wheels24.gr/?action=CHECK&s=谷歌搜索留痕【tg:seogoogle987】,Qp8
- https://www.safetv.go.kr/base/search/view?searchWord=谷歌搜索留痕【tg:seogoogle987】xQt
- https://www.southmeadows.co.uk/2019/07/?s=谷歌搜索留痕【tg:seogoogle987】,5KP
- https://www.resopal.de/catalogsearch/result/?action=SEARCH&q=谷歌搜索留痕【tg:seogoogle987】,Ajm
- https://www.shacknews.com/editorial-search?q=谷歌搜索留痕【tg:seogoogle987】,SHL
- https://www.totolink.vn/search/谷歌搜索留痕【tg:seogoogle987】,DyQ
- https://www.qidulp.com/search?query=谷歌搜索留痕【tg:seogoogle987】,BQK
- https://www.parl.ca/legisinfo/fr/projets-de-loi?parlsession=all&view=list&keywords=谷歌搜索留痕【tg:seogoogle987】,ERO
- https://www.xvideos.com/tags/谷歌搜索留痕【tg:seogoogle987】,uov
- https://www.zalora.sg/catalog/?cat=112&q=谷歌搜索留痕【tg:seogoogle987】,hb3
- https://www.skicheck.at/en/?action=CHECK&s=谷歌搜索留痕【tg:seogoogle987】,mBJ
- https://www.scq.ubc.ca/?page=2&s=谷歌搜索留痕【tg:seogoogle987】,DTR
- https://www.scivee.tv/?s=谷歌搜索留痕【tg:seogoogle987】,VRT
- https://www.lgnewsroom.com/search/谷歌搜索留痕【tg:seogoogle987】,nre
- https://www.temu.com/search_result.html?search_key=谷歌搜索留痕【tg:seogoogle987】zNK
- https://www.teamlab.art/th/?submit=谷歌搜索留痕【tg:seogoogle987】,BVJ
- https://www.seagrant.wisc.edu/?page=63&s=谷歌搜索留痕【tg:seogoogle987】,ruc
- https://www.world-architects.com/en/search?term=谷歌搜索留痕【tg:seogoogle987】,3FW
- https://www.sonepar.ch/fr/search?q=谷歌搜索留痕【tg:seogoogle987】,OJv
- https://www.vivaraise.fr/catalogsearch/result/?q=谷歌搜索留痕【tg:seogoogle987】,15y
- https://www.kyuhoshi.com/?s=谷歌搜索留痕【tg:seogoogle987】,RUe
- https://www.remit.co.jp/ne/?s=谷歌搜索留痕【tg:seogoogle987】,PGp
- https://www.tarleton.edu/?s=谷歌搜索留痕【tg:seogoogle987】,pRU
- https://www.theaerogroup.net/?cat=28&s=谷歌搜索留痕【tg:seogoogle987】,zL3
- https://www.mexperience.com/?T=1686132112324&s=谷歌搜索留痕【tg:seogoogle987】,DOO
- https://www.sweat.com/collections/vendors?q=谷歌搜索留痕【tg:seogoogle987】,nvo
- https://www.ng-slo.si/si/iskanje?cat=114&q=谷歌搜索留痕【tg:seogoogle987】,XqV
- https://www.openspaceinstitute.org/search?q=谷歌搜索留痕【tg:seogoogle987】,HKP
- https://www.posten-portal.de/search?query=谷歌搜索留痕【tg:seogoogle987】,2bu
- https://www.reginatangoshoes.com/en/catalogsearch/result/index/?T=1686132113407&q=谷歌搜索留痕【tg:seogoogle987】,t9M
- https://www.ucycle.com/search/=谷歌搜索留痕【tg:seogoogle987】,Re2
- https://www.lechzuers.com/de/search?cat=163&q=谷歌搜索留痕【tg:seogoogle987】,Hbr
- https://www.pixiv.net/tags/谷歌搜索留痕【tg:seogoogle987】,aqr
- https://www.abbreviations.com/谷歌搜索留痕【tg:seogoogle987】bWl
- https://hsmoa.com/search?query=谷歌搜索留痕【tg:seogoogle987】6JP
- https://www.wou.edu.my/?s=谷歌搜索留痕【tg:seogoogle987】,gvw
- https://www.pacific-lifestyle.co.uk/search?sort=alphabetical&term=谷歌搜索留痕【tg:seogoogle987】,ZiU
- https://www.qylaws.com/search/谷歌搜索留痕【tg:seogoogle987】,ybv
- https://www.sebson.de/en/search?query=谷歌搜索留痕【tg:seogoogle987】,P6Q
- https://www.unclefossil.com/search/谷歌搜索留痕【tg:seogoogle987】,Jjb
- https://www.zisha.com/shop/list.shtml?wap_keyword=谷歌搜索留痕【tg:seogoogle987】,6zM
- https://www.tombow.com/search/谷歌搜索留痕【tg:seogoogle987】,xXE
- https://www.ushmm.org/search/results/?ID=8s0587Oi8UTv74zPPM4fuhwjNpe2hsEE&q=谷歌搜索留痕【tg:seogoogle987】,Y0t
- https://www.lneg.pt/?cat=140&s=谷歌搜索留痕【tg:seogoogle987】,sYb
- https://www.sbaad.no/?s=谷歌搜索留痕【tg:seogoogle987】,UCg
- https://www.teamlab.art/es/?submit=谷歌搜索留痕【tg:seogoogle987】,iuY
- https://www.youtube.com/hashtag/谷歌搜索留痕【tg:seogoogle987】,LSg