专栏电商日志财经减肥爱情
投稿投诉
爱情常识
搭配分娩
减肥两性
孕期塑形
财经教案
论文美文
日志体育
养生学堂
电商科学
头戴业界
专栏星座
用品音乐

PromtailPipeline日志处理配置

  Promtail是Loki官方支持的日志采集端,在需要采集日志的节点上运行采集代理,再统一发送到Loki进行处理。除了使用Promtail,社区还有很多采集日志的组件,比如fluentd、fluentbit等,都是比较优秀的。
  但是Promtail是运行Kubernetes时的首选客户端,因为你可以将其配置为自动从Promtail运行的同一节点上运行的Pod中抓取日志。Promtail和Prometheus在Kubernetes中一起运行,还可以实现非常强大的调试功能,如果Prometheus和Promtail使用相同的标签,用户还可以使用Grafana根据标签集在指标和日志之间切换。
  此外如果你想从日志中提取指标,比如计算某个特定信息的出现次数,Promtail效果也是非常友好的。
  在Promtail中一个pipeline管道被用来转换一个单一的日志行、标签和它的时间戳。本文将介绍Promtail中的核心概念pipeline以及了解下如何设置Promtail来处理你的日志行数据,包括提取指标与标签等。
  1基础
  一个pipeline管道是由一组stages阶段组成的,在Promtail配置中一共有4种类型的stages。
  Parsingstages(解析阶段)用于解析当前的日志行并从中提取数据,提取的数据可供其他阶段使用。
  Transformstages(转换阶段)用于对之前阶段提取的数据进行转换。
  Actionstages(处理阶段)用于从以前阶段中提取数据并对其进行处理,包括:添加或修改现有日志行标签更改日志行的时间戳修改日志行内容在提取的数据基础上创建一个metrics指标
  Filteringstages(过滤阶段)可选择应用一个阶段的子集,或根据一些条件删除日志数据。
  一个典型的pipeline将从解析阶段开始(如regex或json阶段)从日志行中提取数据。然后有一系列的处理阶段配置,对提取的数据进行处理。最常见的处理阶段是一个labelsstage标签阶段,将提取的数据转化为标签。
  需要注意的是现在pipeline不能用于重复的日志,例如,Loki将多次收到同一条日志行:从同一文件中读取的两个抓取配置文件中重复的日志行被发送到一个pipeline,不会做重复数据删除
  然后,Loki会在查询时对那些具有完全相同的纳秒时间戳、标签与日志内容的日志进行一些重复数据删除。
  下面的配置示例可以很好地说明我们可以通过pipeline来对日志行数据实现什么功能:spanstylecolor:d19a66;lineheight:26px;scrapeconfigs:span
  spanstylecolor:61aeee;lineheight:26px;spanspanstylecolor:d19a66;lineheight:26px;jobname:spanspanstylecolor:98c379;lineheight:26px;kubernetespodsnamespan
  spanstylecolor:d19a66;lineheight:26px;kubernetessdconfigs:spanspanstylecolor:98c379;lineheight:26px;。。。。span
  spanstylecolor:d19a66;lineheight:26px;pipelinestages:span
  spanstylecolor:5c6370;fontstyle:italic;lineheight:26px;这个阶段只有在被抓取地目标有一个标签名为name且值为promtail地时候才会执行span
  spanstylecolor:61aeee;lineheight:26px;spanspanstylecolor:d19a66;lineheight:26px;match:span
  spanstylecolor:d19a66;lineheight:26px;selector:spanspanstylecolor:98c379;lineheight:26px;{namepromtail}span
  spanstylecolor:d19a66;lineheight:26px;stages:span
  spanstylecolor:5c6370;fontstyle:italic;lineheight:26px;regex阶段解析出一个level、timestamp与component,在该阶段结束时,这几个值只为pipeline内部设置,在以后地阶段可以使用这些值并决定如何处理他们。span
  spanstylecolor:61aeee;lineheight:26px;spanspanstylecolor:d19a66;lineheight:26px;regex:span
  spanstylecolor:d19a66;lineheight:26px;expression:spanspanstylecolor:98c379;lineheight:26px;。level(?Plevel〔azAZ〕)。ts(?Ptimestamp〔Td:。Z〕)。component(?Pcomponent〔azAZ〕)span
  spanstylecolor:5c6370;fontstyle:italic;lineheight:26px;labels阶段从前面地regex阶段获取level、component值,并将他们变成一个标签,比如levelerror可能就是这个阶段添加地一个标签。span
  spanstylecolor:61aeee;lineheight:26px;spanspanstylecolor:d19a66;lineheight:26px;labels:span
  spanstylecolor:d19a66;lineheight:26px;level:span
  spanstylecolor:d19a66;lineheight:26px;component:span
  spanstylecolor:5c6370;fontstyle:italic;lineheight:26px;最后,时间戳阶段采用从regex提取地timestamp,并将其变成日志的新时间戳,并解析为RFC3339Nano格式。span
  spanstylecolor:61aeee;lineheight:26px;spanspanstylecolor:d19a66;lineheight:26px;timestamp:span
  spanstylecolor:d19a66;lineheight:26px;format:spanspanstylecolor:98c379;lineheight:26px;RFC3339Nanospan
  spanstylecolor:d19a66;lineheight:26px;source:spanspanstylecolor:98c379;lineheight:26px;timestampspan
  spanstylecolor:5c6370;fontstyle:italic;lineheight:26px;这个阶段只有在抓取的目标标签为name,值为nginx,并且日志行中包含GET字样的时候才会执行span
  spanstylecolor:61aeee;lineheight:26px;spanspanstylecolor:d19a66;lineheight:26px;match:span
  spanstylecolor:d19a66;lineheight:26px;selector:spanspanstylecolor:98c379;lineheight:26px;{namenginx}GETspan
  spanstylecolor:d19a66;lineheight:26px;stages:span
  spanstylecolor:5c6370;fontstyle:italic;lineheight:26px;regex阶段通过匹配一些值来提取一个新的output值。span
  spanstylecolor:61aeee;lineheight:26px;spanspanstylecolor:d19a66;lineheight:26px;regex:span
  spanstylecolor:d19a66;lineheight:26px;expression:spanspanstylecolor:98c379;lineheight:26px;w{1,3}。w{1,3}。w{1,3}。w{1,3}(?Poutput。)span
  spanstylecolor:5c6370;fontstyle:italic;lineheight:26px;output输出阶段通过将捕获的日志行设置为来自上面regex阶段的输出值来更改其内容。span
  spanstylecolor:61aeee;lineheight:26px;spanspanstylecolor:d19a66;lineheight:26px;output:span
  spanstylecolor:d19a66;lineheight:26px;source:spanspanstylecolor:98c379;lineheight:26px;outputspan
  spanstylecolor:5c6370;fontstyle:italic;lineheight:26px;这个阶段只有在抓取到目标中有标签name,值为jaegeragent时才会执行。span
  spanstylecolor:61aeee;lineheight:26px;spanspanstylecolor:d19a66;lineheight:26px;match:span
  spanstylecolor:d19a66;lineheight:26px;selector:spanspanstylecolor:98c379;lineheight:26px;{namejaegeragent}span
  spanstylecolor:d19a66;lineheight:26px;stages:span
  spanstylecolor:5c6370;fontstyle:italic;lineheight:26px;JSON阶段将日志行作为JSON字符串读取,并从对象中提取level字段,以便在后续的阶段中使用。span
  spanstylecolor:61aeee;lineheight:26px;spanspanstylecolor:d19a66;lineheight:26px;json:span
  spanstylecolor:d19a66;lineheight:26px;expressions:span
  spanstylecolor:d19a66;lineheight:26px;level:spanspanstylecolor:98c379;lineheight:26px;levelspan
  spanstylecolor:5c6370;fontstyle:italic;lineheight:26px;将上一个阶段中的level值变成一个标签。span
  spanstylecolor:61aeee;lineheight:26px;spanspanstylecolor:d19a66;lineheight:26px;labels:span
  spanstylecolor:d19a66;lineheight:26px;level:span
  spanstylecolor:61aeee;lineheight:26px;spanspanstylecolor:d19a66;lineheight:26px;jobname:spanspanstylecolor:98c379;lineheight:26px;kubernetespodsappspan
  spanstylecolor:d19a66;lineheight:26px;kubernetessdconfigs:spanspanstylecolor:98c379;lineheight:26px;。。。。span
  spanstylecolor:d19a66;lineheight:26px;pipelinestages:span
  spanstylecolor:5c6370;fontstyle:italic;lineheight:26px;这个阶段只有在被抓取的目标的标签为app,名称为grafana或prometheus时才会执行。span
  spanstylecolor:61aeee;lineheight:26px;spanspanstylecolor:d19a66;lineheight:26px;match:span
  spanstylecolor:d19a66;lineheight:26px;selector:spanspanstylecolor:98c379;lineheight:26px;{appgrafanaprometheus}span
  spanstylecolor:d19a66;lineheight:26px;stages:span
  spanstylecolor:5c6370;fontstyle:italic;lineheight:26px;regex阶段将提取一个level合componet值,供后面的阶段使用,允许level被定义为lvllevel或levellevel,组件被定义为loggercomponent或componentcomponentspan
  spanstylecolor:61aeee;lineheight:26px;spanspanstylecolor:d19a66;lineheight:26px;regex:span
  spanstylecolor:d19a66;lineheight:26px;expression:spanspanstylecolor:98c379;lineheight:26px;。(lvllevel)(?Plevel〔azAZ〕)。(loggercomponent)(?Pcomponent〔azAZ〕)span
  spanstylecolor:5c6370;fontstyle:italic;lineheight:26px;然后标签阶段将从上面regex阶段提取的level和component变为标签。span
  spanstylecolor:61aeee;lineheight:26px;spanspanstylecolor:d19a66;lineheight:26px;labels:span
  spanstylecolor:d19a66;lineheight:26px;level:span
  spanstylecolor:d19a66;lineheight:26px;component:span
  spanstylecolor:5c6370;fontstyle:italic;lineheight:26px;只有当被抓取的目标有一个标签app,其值为someapp,并且日志行不包含info一词时,这个阶段才会执行。span
  spanstylecolor:61aeee;lineheight:26px;spanspanstylecolor:d19a66;lineheight:26px;match:span
  spanstylecolor:d19a66;lineheight:26px;selector:spanspanstylecolor:98c379;lineheight:26px;{appsomeapp}!infospan
  spanstylecolor:d19a66;lineheight:26px;stages:span
  spanstylecolor:5c6370;fontstyle:italic;lineheight:26px;regex阶段尝试通过查找日志中的panic来提取panic信息span
  spanstylecolor:61aeee;lineheight:26px;spanspanstylecolor:d19a66;lineheight:26px;regex:span
  spanstylecolor:d19a66;lineheight:26px;expression:spanspanstylecolor:98c379;lineheight:26px;。(?Ppanicpanic:。)span
  spanstylecolor:5c6370;fontstyle:italic;lineheight:26px;metrics阶段将增加一个Promtail暴露的panictotal指标,只有当从上面的regex阶段获取到panic值的时候,该Counter才会增加。span
  spanstylecolor:61aeee;lineheight:26px;spanspanstylecolor:d19a66;lineheight:26px;metrics:span
  spanstylecolor:d19a66;lineheight:26px;panictotal:span
  spanstylecolor:d19a66;lineheight:26px;type:spanspanstylecolor:98c379;lineheight:26px;Counterspan
  spanstylecolor:d19a66;lineheight:26px;description:spanspanstylecolor:98c379;lineheight:26px;totalcountofpanicspan
  spanstylecolor:d19a66;lineheight:26px;source:spanspanstylecolor:98c379;lineheight:26px;panicspan
  spanstylecolor:d19a66;lineheight:26px;config:span
  spanstylecolor:d19a66;lineheight:26px;action:spanspanstylecolor:98c379;lineheight:26px;incspan
  下面我们先简单描述下每个阶段可以使用的数据有哪些。标签集:当前日志行的标签集合,初始化是与日志一起被抓取的标签集,标签集只由处理阶段进行修改,但过滤阶段会从中读取,最终的标签集将由Loki建立索引,并可用于查询。提取的键值对:在解析阶段提取的键值对集合,后续的阶段对提取的Map进行操作,或者对它们进行转换,或者对它们进行处理。在一个pipeline的末端,提取的Map会被丢弃掉,为了使一个解析阶段有用,它必须总要与至少一个处理阶段配对。提取的Map被初始化,其初始化标签是与日志行一起抓取的,这个初始数据允许在只操作提取的Map的pipeline阶段内对标签的值进行处理。例如,从文件中提取的日志条目有一个标签filename,其值是被提取的文件路径,当一个pipeline执行该日志时,最初提取的Map将包含使用与标签相同值的文件名。日志时间戳:日志行的当前时间戳,处理阶段可以修改这个值。如果不设置,则默认为日志被抓取的时间。时间戳的最终值会发送给Loki。日志行:当前的日志行,以文本形式表示,初始化为Promtail抓取的文本。处理阶段可以修改这个值。日志行的最终值将作为日志的文本内容发送给Loki。2阶段
  上面我们结束了Promtail的一个pipeline中有4中类型的阶段,下面我们再分别对这4中类型阶段进行简单说明。解析阶段
  解析阶段包括:docker、cri、regex、json这几个stage。docker
  docker阶段通过使用标签的Docker日志格式来解析日志数据进行数据提取。直接使用docker:{}即表示是一个docker阶段。
  与大多数阶段不同,docker阶段不提供配置选项,只支持特定的Docker日志格式,来自Docker的每一行日志都被写成JSON格式,其键值如下。log:日志行的内容stream:stdout或者stderrtime:日志行的时间戳字符串
  例如配置下面的pipeline:spanstylecolor:61aeee;lineheight:26px;spanspanstylecolor:d19a66;lineheight:26px;docker:spanspanstylecolor:98c379;lineheight:26px;{}span
  将会解析Docker日志成如下所示格式:{
  spanstylecolor:d19a66;lineheight:26px;logspan:spanstylecolor:98c379;lineheight:26px;logmessagespan,
  spanstylecolor:d19a66;lineheight:26px;streamspan:spanstylecolor:98c379;lineheight:26px;stderrspan,
  spanstylecolor:d19a66;lineheight:26px;timespan:spanstylecolor:98c379;lineheight:26px;20190430T02:12:41。8443515Zspan
  }
  在提取的数据集中,将创建以下键值对:output:logmessagestream:stderrtimestamp:20190430T02:12:41。8443515cri
  通过使用标准CRI格式解析日志行来提取数据。使用语法一样是直接使用cri:{}即可,与大多数阶段不同,cri阶段不提供配置选项,只支持特定的CRI日志格式。CRI指定的日志行是以空格分隔的值,有以下组成部分:log:整个日志行的内容stream:stdout或者stderrtime:日志行的时间戳字符串
  组件之间不允许有空白,在下面的例子中,只有第一行日志可以使用cri阶段进行正确格式化。20190101T01:00:00。000000001ZstderrPtestgood
  20190101T01:00:00。000000001Zstderrtestgood
  20190101T01:00:00。000000001Ztestgood
  例如配置下面的pipeline:spanstylecolor:61aeee;lineheight:26px;spanspanstylecolor:d19a66;lineheight:26px;cri:spanspanstylecolor:98c379;lineheight:26px;{}span
  当我们有如下所示的日志行数据:20190430T02:12:41。8443515Zstdoutxxmessage
  在提取的数据集中,将创建以下键值对:output:messagestream:stdouttimestamp:20190430T02:12:41。8443515regex
  使用正则表达式提取数据,在regex中命名的捕获组支持将数据添加到提取的Map映射中。配置格式如下所示:spanstylecolor:d19a66;lineheight:26px;regex:span
  spanstylecolor:5c6370;fontstyle:italic;lineheight:26px;RE2正则表达式,每个捕获组必须被命名。span
  spanstylecolor:d19a66;lineheight:26px;expression:spanspanstylecolor:98c379;lineheight:26px;stringspan
  spanstylecolor:5c6370;fontstyle:italic;lineheight:26px;从指定名称中提取数据,如果为空,则使用log信息。span
  spanstylecolor:98c379;lineheight:26px;〔source:spanspanstylecolor:98c379;lineheight:26px;string〕span
  其中的expression是一个GoogleRE2正则表达式字符串,每个捕获组将被设置为到提取的Map中去,每个捕获组也必须命名:(?Pnamere),捕获组的名称将被用作提取的Map中的键。
  另外需要注意,在使用双引号时,必须转义正则表达式中的所有反斜杠。例如下面的几个表达式都是有效的:expression:wexpression:wexpression:w
  但是下面的这几个是无效的表达式:expression:w在使用双引号时才转义反斜线expression:w在使用双引号时才转义反斜线expression:w在使用双引号的时候,反斜杠必须被转义
  例如我们使用下的不带source的pipeline配置:spanstylecolor:61aeee;lineheight:26px;spanspanstylecolor:d19a66;lineheight:26px;regex:span
  spanstylecolor:d19a66;lineheight:26px;expression:spanspanstylecolor:98c379;lineheight:26px;(?s)(?PtimeS?)(?Pstreamstdoutstderr)(?PflagsS?)(?Pcontent。)span
  当我们要抓取的日志数据为:20190101T01:00:00。000000001ZstderrPimalogmessage!
  该pipeline执行后以下键值对将被添加到提取的Map中去:time:20190101T01:00:00。000000001Zstream:stderrflags:Pcontent:imalogmessage
  如果我们使用带上source的pipeline配置:spanstylecolor:61aeee;lineheight:26px;spanspanstylecolor:d19a66;lineheight:26px;json:span
  spanstylecolor:d19a66;lineheight:26px;expressions:span
  spanstylecolor:d19a66;lineheight:26px;time:span
  spanstylecolor:61aeee;lineheight:26px;spanspanstylecolor:d19a66;lineheight:26px;regex:span
  spanstylecolor:d19a66;lineheight:26px;expression:spanspanstylecolor:98c379;lineheight:26px;(?Pyeard)span
  spanstylecolor:d19a66;lineheight:26px;source:spanspanstylecolor:98c379;lineheight:26px;timespan
  如果需要抓取的日志数据为:{spanstylecolor:d19a66;lineheight:26px;timespan:spanstylecolor:98c379;lineheight:26px;20190101T01:00:00。000000001Zspan}
  则第一阶段将把以下键值对添加到提取的Map中:time:20190101T01:00:00。000000001Z
  而regex阶段将解析提取的Map中的时间值,并将以下键值对追加到提取的Map中去:year:2019json
  通过将日志行解析为JSON来提取数据,也可以接受JMESPath表达式来提取数据,配置格式如下所示:spanstylecolor:d19a66;lineheight:26px;json:span
  spanstylecolor:5c6370;fontstyle:italic;lineheight:26px;JMESPath表达式的键值对集合,键将是提取的数据中的键,而表达式将是值,被评估为来自源数据的JMESPath。span
  spanstylecolor:5c6370;fontstyle:italic;lineheight:26px;span
  spanstylecolor:5c6370;fontstyle:italic;lineheight:26px;JMESPath表达式可以通过用双引号来包装一个键完成,然后在YAML中必须用单引号包装起来,这样它们就会被传递给JMESPath解析器进行解析。span
  spanstylecolor:d19a66;lineheight:26px;expressions:span
  spanstylecolor:98c379;lineheight:26px;〔spanspanstylecolor:98c379;lineheight:26px;string:spanspanstylecolor:98c379;lineheight:26px;stringspanspanstylecolor:98c379;lineheight:26px;。。。spanspanstylecolor:98c379;lineheight:26px;〕span
  spanstylecolor:98c379;lineheight:26px;〔source:spanspanstylecolor:98c379;lineheight:26px;string〕span
  该阶段使用GolangJSON反序列化,提取的数据可以持有非字符串值,本阶段不做任何类型转换,在下游阶段将需要对这些值进行必要的类型转换,可以参考后面的template阶段了解如何进行转换。
  注意:如果提取的值是一个复杂的类型,比如数组或JSON对象,它将被转换为JSON字符串,然后插入到提取的数据中去。
  例如我们使用如下所示的pipeline配置:spanstylecolor:61aeee;lineheight:26px;spanspanstylecolor:d19a66;lineheight:26px;json:span
  spanstylecolor:d19a66;lineheight:26px;expressions:span
  spanstylecolor:d19a66;lineheight:26px;output:spanspanstylecolor:98c379;lineheight:26px;logspan
  spanstylecolor:d19a66;lineheight:26px;stream:spanspanstylecolor:98c379;lineheight:26px;streamspan
  spanstylecolor:d19a66;lineheight:26px;timestamp:spanspanstylecolor:98c379;lineheight:26px;timespan
  要抓取的日志行数据为:{
  spanstylecolor:d19a66;lineheight:26px;logspan:spanstylecolor:98c379;lineheight:26px;logmessagespan,
  spanstylecolor:d19a66;lineheight:26px;streamspan:spanstylecolor:98c379;lineheight:26px;stderrspan,
  spanstylecolor:d19a66;lineheight:26px;timespan:spanstylecolor:98c379;lineheight:26px;20190430T02:12:41。8443515Zspan
  }
  在提取的数据集中,将创建以下键值对:output:logmessagestream:stderrtimestamp:20190430T02:12:41。8443515
  然后我们还可以用下面的pipeline配置来提前数据:spanstylecolor:61aeee;lineheight:26px;spanspanstylecolor:d19a66;lineheight:26px;json:span
  spanstylecolor:d19a66;lineheight:26px;expressions:span
  spanstylecolor:d19a66;lineheight:26px;output:spanspanstylecolor:98c379;lineheight:26px;logspan
  spanstylecolor:d19a66;lineheight:26px;stream:spanspanstylecolor:98c379;lineheight:26px;streamspan
  spanstylecolor:d19a66;lineheight:26px;timestamp:spanspanstylecolor:98c379;lineheight:26px;timespan
  spanstylecolor:d19a66;lineheight:26px;extra:span
  spanstylecolor:61aeee;lineheight:26px;spanspanstylecolor:d19a66;lineheight:26px;json:span
  spanstylecolor:d19a66;lineheight:26px;expressions:span
  spanstylecolor:d19a66;lineheight:26px;user:span
  spanstylecolor:d19a66;lineheight:26px;source:spanspanstylecolor:98c379;lineheight:26px;extraspan
  要抓取的日志行数据为:{
  spanstylecolor:d19a66;lineheight:26px;logspan:spanstylecolor:98c379;lineheight:26px;logmessagespan,
  spanstylecolor:d19a66;lineheight:26px;streamspan:spanstylecolor:98c379;lineheight:26px;stderrspan,
  spanstylecolor:d19a66;lineheight:26px;timespan:spanstylecolor:98c379;lineheight:26px;20190430T02:12:41。8443515Zspan,
  spanstylecolor:d19a66;lineheight:26px;extraspan:spanstylecolor:98c379;lineheight:26px;{user:marco}span
  }
  第一个json阶段执行后将在提取的数据集中创建以下键值对:output:logmessagestream:stderrtimestamp:20190430T02:12:41。8443515extra:{user:marco}
  然后经过第二个json阶段执行后将把提取数据中的extra值解析为JSON,并将以下键值对添加到提取的数据集中:user:marco
  此外我们还可以使用JMESPath表达式来解析有特殊字符的JSON字段(比如或。),比如我们现在有如下所示的pipeline配置:spanstylecolor:61aeee;lineheight:26px;spanspanstylecolor:d19a66;lineheight:26px;json:span
  spanstylecolor:d19a66;lineheight:26px;expressions:span
  spanstylecolor:d19a66;lineheight:26px;output:spanspanstylecolor:98c379;lineheight:26px;logspan
  spanstylecolor:d19a66;lineheight:26px;stream:spanspanstylecolor:98c379;lineheight:26px;grpc。streamspan
  spanstylecolor:d19a66;lineheight:26px;timestamp:spanspanstylecolor:98c379;lineheight:26px;timespan
  需要抓取的日志数据如下所示:{
  spanstylecolor:d19a66;lineheight:26px;logspan:spanstylecolor:98c379;lineheight:26px;logmessagespan,
  spanstylecolor:d19a66;lineheight:26px;grpc。streamspan:spanstylecolor:98c379;lineheight:26px;stderrspan,
  spanstylecolor:d19a66;lineheight:26px;timespan:spanstylecolor:98c379;lineheight:26px;20190430T02:12:41。8443515Zspan
  }
  在提取的数据集中,将创建以下键值对。output:logmessagestream:stderrtimestamp:20190430T02:12:41。8443515
  需要注意的是在引用grpc。stream时,如果没有用单引号包裹的双引号,将无法正常工作。转换阶段
  转换阶段用于对之前阶段提取的数据进行转换。multiline
  多行阶段将多行日志进行合并,然后再将其传递到pipeline的下一个阶段。
  一个新的日志块由第一行正则表达式来识别,任何与表达式不匹配的行都被认为是前一个匹配块的一部分。配置格式如下所示:spanstylecolor:d19a66;lineheight:26px;multiline:span
  spanstylecolor:5c6370;fontstyle:italic;lineheight:26px;RE2正则表达式,如果匹配将开始一个新的多行日志块span
  spanstylecolor:5c6370;fontstyle:italic;lineheight:26px;这个表达式必须被提供span
  spanstylecolor:d19a66;lineheight:26px;firstline:spanspanstylecolor:98c379;lineheight:26px;stringspan
  spanstylecolor:5c6370;fontstyle:italic;lineheight:26px;解析的最大等待时间(Goduration):https:golang。orgpkgtimeParseDuration。span
  spanstylecolor:5c6370;fontstyle:italic;lineheight:26px;如果在这个最大的等待时间内没有新的日志,那么当前日志块将被继续发送。span
  spanstylecolor:5c6370;fontstyle:italic;lineheight:26px;如果被观察的应用程序因为异常而down掉了,该参数很有用,没有新的日志出现,并且异常块会在最大等待时间过后发送span
  spanstylecolor:5c6370;fontstyle:italic;lineheight:26px;默认为3sspan
  spanstylecolor:d19a66;lineheight:26px;maxwaittime:spanspanstylecolor:98c379;lineheight:26px;durationspan
  spanstylecolor:5c6370;fontstyle:italic;lineheight:26px;一个多行日志块有的最大行数,如果该块有更多的行,就会认为是新的日志行span
  spanstylecolor:5c6370;fontstyle:italic;lineheight:26px;默认为128行span
  spanstylecolor:d19a66;lineheight:26px;maxlines:spanspanstylecolor:98c379;lineheight:26px;integerspan
  比如现在我们有一个flask应用,下面的日志数据包含异常信息:〔2020120311:36:20〕GEThelloHTTP1。1200
  〔2020120311:36:23〕ERRORinapp:Exceptiononerror〔GET〕
  Traceback(mostrecentcalllast):
  Filehomepallets。pyenvversions3。8。5libpython3。8sitepackagesflaskapp。py,line2447,inwsgiapp
  responseself。fulldispatchrequest()
  Filehomepallets。pyenvversions3。8。5libpython3。8sitepackagesflaskapp。py,line1952,infulldispatchrequest
  rvself。handleuserexception(e)
  Filehomepallets。pyenvversions3。8。5libpython3。8sitepackagesflaskapp。py,line1821,inhandleuserexception
  reraise(exctype,excvalue,tb)
  Filehomepallets。pyenvversions3。8。5libpython3。8sitepackagesflaskcompat。py,line39,inreraise
  raisevalue
  Filehomepallets。pyenvversions3。8。5libpython3。8sitepackagesflaskapp。py,line1950,infulldispatchrequest
  rvself。dispatchrequest()
  Filehomepallets。pyenvversions3。8。5libpython3。8sitepackagesflaskapp。py,line1936,indispatchrequest
  returnself。viewfunctions〔rule。endpoint〕(req。viewargs)
  Filehomepalletssrcdeploymenttoolshello。py,line10,inerror
  raiseException(Sorry,thisroutealwaysbreaks)
  Exception:Sorry,thisroutealwaysbreaks
  〔2020120311:36:23〕GETerrorHTTP1。1500
  〔2020120311:36:26〕GEThelloHTTP1。1200
  〔2020120311:36:27〕GEThelloHTTP1。1200
  显然我们更希望将上面的Exception多行日志识别为一个日志块,在这个示例中,所有的日志块都是括号包括的时间开始的,所以我们可以用firstline正则表达式:〔d{4}d{2}d{2}d{1,2}:d{2}:d{2}〕来配置一个多行阶段,这将匹配上面我们的异常日志的开头部分,但是不会匹配后面的异常行,直到Exception:Sorry,thisroutealwaysbreaks这一行日志,这些将被识别为单个日志块,在Loki中也是以一个日志条目出现的。spanstylecolor:d19a66;lineheight:26px;multiline:span
  spanstylecolor:5c6370;fontstyle:italic;lineheight:26px;识别时间戳作为多行日志的第一行,注意这里字符串应该使用单引号。span
  spanstylecolor:d19a66;lineheight:26px;firstline:spanspanstylecolor:98c379;lineheight:26px;〔d{4}d{2}d{2}d{1,2}:d{2}:d{2}〕span
  spanstylecolor:d19a66;lineheight:26px;maxwaittime:spanspanstylecolor:98c379;lineheight:26px;3sspan
  这个示例是假设我们对日志格式没有进行控制,所以我们需要一个更复杂的正则表达式来匹配第一行日志,但是如果我们能够控制被观察的日志格式,那么我们就可以简化第一行的匹配规则。
  下面的是一个简单的AkkaHTTP服务的日志:〔2021010714:17:43,494〕〔DEBUG〕〔akka。io。TcpListener〕〔HelloAkkaHttpServerakka。actor。defaultdispatcher26〕〔akka:HelloAkkaHttpServersystemIOTCPselectorsa0〕Newconnectionaccepted
  〔2021010714:17:43,499〕〔ERROR〕〔akka。actor。ActorSystemImpl〕〔HelloAkkaHttpServerakka。actor。defaultdispatcher3〕〔akka。actor。ActorSystemImpl(HelloAkkaHttpServer)〕Errorduringprocessingofrequest:ohno!ohisunknown。Completingwith500InternalServerErrorresponse。Tochangedefaultexceptionhandlingbehavior,provideacustomExceptionHandler。
  java。lang。Exception:ohno!ohisunknown
  atcom。grafana。UserRoutes。anonfunuserRoutes6(UserRoutes。scala:28)
  atakka。http。scaladsl。server。Directive。anonfunaddByNamearyApply2(Directive。scala:166)
  atakka。http。scaladsl。server。ConjunctionMagnetanon2。anonfunapply3(Directive。scala:234)
  atakka。http。scaladsl。server。directives。BasicDirectives。anonfunmapRouteResult2(BasicDirectives。scala:68)
  atakka。http。scaladsl。server。directives。BasicDirectives。anonfuntextract2(BasicDirectives。scala:161)
  atakka。http。scaladsl。server。RouteConcatenationRouteWithConcatenation。anonfuntilde2(RouteConcatenation。scala:47)
  atakka。http。scaladsl。util。FastFuture。strictTransform1(FastFuture。scala:40)
  。。。
  简单一看和其他日志一样,我们来看看日志的格式:configuration
  filecrasher。logfile
  trueappend
  encoder
  patternZeroWidthSpace;〔date{ISO8601}〕〔level〕〔logger〕〔thread〕〔X{akkaSource}〕msgnpattern
  encoder
  appender
  queueSize1024queueSize
  neverBlocktrueneverBlock
  appender
  rootlevelDEBUG
  root
  configuration
  对于Logback配置来说,没有什么特别之处,除了在每个日志行的开头有一个ZeroWidthSpace;,这是零宽度空格的HTML代码,它使得识别第一行变得更加简单了,这里我们使用的第一行匹配正则表达式为:x{200B}〔,200B是零宽度空格字符的Unicode编码:spanstylecolor:d19a66;lineheight:26px;multiline:span
  spanstylecolor:5c6370;fontstyle:italic;lineheight:26px;将零宽度的空格确定为多行块的第一行,注意该字符串应使用单引号。span
  spanstylecolor:d19a66;lineheight:26px;firstline:spanspanstylecolor:98c379;lineheight:26px;x{200B}〔span
  spanstylecolor:d19a66;lineheight:26px;maxwaittime:spanspanstylecolor:98c379;lineheight:26px;3sspan
  template
  template阶段可以使用Go模板语法来操作提取的数据。模板阶段主要用于在将数据设置为标签之前对其他阶段的数据进行操作,例如用下划线替换空格,或者将大写的字符串转换为小写的字符串。模板也可以用来构建具有多个键的信息。模板阶段也可以在提取的数据中创建新的键。
  配置格式如下所示:spanstylecolor:d19a66;lineheight:26px;template:span
  spanstylecolor:5c6370;fontstyle:italic;lineheight:26px;要解析的提取数据中的名称,如果提前数据中的key不存在,将为其添加一个新的值span
  spanstylecolor:d19a66;lineheight:26px;source:spanspanstylecolor:98c379;lineheight:26px;stringspan
  spanstylecolor:5c6370;fontstyle:italic;lineheight:26px;使用的Go模板字符串。除了正常的模板之外span
  spanstylecolor:5c6370;fontstyle:italic;lineheight:26px;functions,ToLower,ToUpper,Replace,Trim,TrimLeft,TrimRight,span
  spanstylecolor:5c6370;fontstyle:italic;lineheight:26px;TrimPrefix,TrimSuffix,andTrimSpace都是可以使用的函数。span
  spanstylecolor:d19a66;lineheight:26px;template:spanspanstylecolor:98c379;lineheight:26px;stringsspan
  比如下面的pipeline配置:spanstylecolor:61aeee;lineheight:26px;spanspanstylecolor:d19a66;lineheight:26px;template:span
  spanstylecolor:d19a66;lineheight:26px;source:spanspanstylecolor:98c379;lineheight:26px;newkeyspan
  spanstylecolor:d19a66;lineheight:26px;template:spanspanstylecolor:98c379;lineheight:26px;helloworld!span
  假如还没有任何数据被添加到提取的数据中,这个阶段将首先在提取的数据Map中添加一个空白值的newkey,然后它的值将被设置为helloworld!。
  在看下面的模板阶段配置:spanstylecolor:61aeee;lineheight:26px;spanspanstylecolor:d19a66;lineheight:26px;template:span
  spanstylecolor:d19a66;lineheight:26px;source:spanspanstylecolor:98c379;lineheight:26px;appspan
  spanstylecolor:d19a66;lineheight:26px;template:spanspanstylecolor:98c379;lineheight:26px;spanstylecolor:d19a66;lineheight:26px;{{。Value}}spansomesuffixspan
  这个pipeline在现有提取的数据中获取键为app的值,并将somsuffix附加到值后面。例如,如果提前的数据Map的键为app,值为loki,那么这个阶段将把值从loki修改为lokisomsuffix。spanstylecolor:61aeee;lineheight:26px;spanspanstylecolor:d19a66;lineheight:26px;template:span
  spanstylecolor:d19a66;lineheight:26px;source:spanspanstylecolor:98c379;lineheight:26px;appspan
  spanstylecolor:d19a66;lineheight:26px;template:spanspanstylecolor:98c379;lineheight:26px;spanstylecolor:d19a66;lineheight:26px;{{ToLower。Value}}spanspan
  这个pipeline从提取的数据中获取键为app的值,并将其值转换为小写。例如,如果提取的数据键app的值为LOKI,那么这个阶段将把值转换为小写的loki。spanstylecolor:61aeee;lineheight:26px;spanspanstylecolor:d19a66;lineheight:26px;template:span
  spanstylecolor:d19a66;lineheight:26px;source:spanspanstylecolor:98c379;lineheight:26px;outputmsgspan
  spanstylecolor:d19a66;lineheight:26px;template:spanspanstylecolor:98c379;lineheight:26px;spanstylecolor:d19a66;lineheight:26px;{{。level}}spanforappspanstylecolor:d19a66;lineheight:26px;{{ToUpper。app}}spanspan
  这个pipeline从提取的数据中获取level与app的值,一个新的outputmsg将被添加到提取的数据中,值为上面模板的计算结果。
  例如,如果提取的数据中包含键为app,值为loki的数据,level的值为warn,那么经过该阶段后会添加一个新的数据,键为outputmsg,其值为warnforappLOKI。
  任何先前提取的键都可以在模板中使用,所有提取的键都可用于模板的扩展。spanstylecolor:61aeee;lineheight:26px;spanspanstylecolor:d19a66;lineheight:26px;template:span
  spanstylecolor:d19a66;lineheight:26px;source:spanspanstylecolor:98c379;lineheight:26px;appspan
  spanstylecolor:d19a66;lineheight:26px;template:spanspanstylecolor:98c379;lineheight:26px;spanstylecolor:d19a66;lineheight:26px;{{。level}}spanforappspanstylecolor:d19a66;lineheight:26px;{{ToUpper。Value}}spaninmodulespanstylecolor:d19a66;lineheight:26px;{{。module}}spanspan
  上面的这个pipeline从提取的数据中获取level、app和module值。例如,如果提取的数据包含值为loki的app,level的值为warn,moudule的值为test,则这个阶段会将提取数据app的值更改为warnforappLOKIinmoduletest。
  任何之前获取的键都可以在模板中使用,此外,如果source是可用的,它可以在模板中被称为。Value,我们这里app被当成了source,所以它可以在模板中通过。Value使用。spanstylecolor:61aeee;lineheight:26px;spanspanstylecolor:d19a66;lineheight:26px;template:span
  spanstylecolor:d19a66;lineheight:26px;source:spanspanstylecolor:98c379;lineheight:26px;appspan
  spanstylecolor:d19a66;lineheight:26px;template:spanspanstylecolor:98c379;lineheight:26px;spanstylecolor:d19a66;lineheight:26px;{{Replace。Valuelokiblokey1}}spanspan
  这里的模板使用Go的string。Replace函数,当模板执行时,从提取的Map数据中的键为app的全部内容将最多有1个loki的实例被改为blokey。
  另外有一个名为Entry的特殊键可以用来引用当前行,当你需要追加或预设日志行的时候,这应该会很有用。spanstylecolor:61aeee;lineheight:26px;spanspanstylecolor:d19a66;lineheight:26px;template:span
  spanstylecolor:d19a66;lineheight:26px;source:spanspanstylecolor:98c379;lineheight:26px;messagespan
  spanstylecolor:d19a66;lineheight:26px;template:spanspanstylecolor:98c379;lineheight:26px;spanstylecolor:d19a66;lineheight:26px;{{。app}}span:spanstylecolor:d19a66;lineheight:26px;{{。Entry}}spanspan
  spanstylecolor:61aeee;lineheight:26px;spanspanstylecolor:d19a66;lineheight:26px;output:span
  spanstylecolor:d19a66;lineheight:26px;source:spanspanstylecolor:98c379;lineheight:26px;messagespan
  例如,上面的片段会在日志行前加上应用程序的名称。
  在Loki2。3中,所有的sprig函数都被添加到了当前的模板阶段,包括ToLowerToUpper、Replace、Trim、Regex、Hash和Sha2Hash函数。处理阶段
  用于从以前阶段中提取数据并对其进行处理。timestamp
  设置日志条目的时间戳值,当时间戳阶段不存在时,日志行的时间戳默认为日志条目被抓取的时间。
  配置格式如下所示:spanstylecolor:d19a66;lineheight:26px;timestamp:span
  spanstylecolor:d19a66;lineheight:26px;source:spanspanstylecolor:98c379;lineheight:26px;stringspan
  spanstylecolor:5c6370;fontstyle:italic;lineheight:26px;解析时间字符串的格式,可以只有预定义的格式有:〔ANSICUnixDateRubyDateRFC822span
  spanstylecolor:5c6370;fontstyle:italic;lineheight:26px;RFC822ZRFC850RFC1123RFC1123ZRFC3339RFC3339NanoUnixspan
  spanstylecolor:5c6370;fontstyle:italic;lineheight:26px;UnixMsUnixUsUnixNs〕。span
  spanstylecolor:d19a66;lineheight:26px;format:spanspanstylecolor:98c379;lineheight:26px;stringspan
  spanstylecolor:5c6370;fontstyle:italic;lineheight:26px;如果格式无法解析,可尝试的fallback的格式span
  spanstylecolor:98c379;lineheight:26px;〔fallbackformats:spanspanstylecolor:98c379;lineheight:26px;〔〕string〕span
  spanstylecolor:5c6370;fontstyle:italic;lineheight:26px;IANA时区数据库字符串span
  spanstylecolor:98c379;lineheight:26px;〔location:spanspanstylecolor:98c379;lineheight:26px;string〕span
  spanstylecolor:5c6370;fontstyle:italic;lineheight:26px;在时间戳无法提取或解析的情况下,应采取何种行动。有效值为:〔skip,fudge〕,默认为fudge。span
  spanstylecolor:98c379;lineheight:26px;〔actiononfailure:spanspanstylecolor:98c379;lineheight:26px;string〕span
  其中的format字段可以参考格式如下所示:ANSIC:MonJan215:04:052006UnixDate:MonJan215:04:05MST2006RubyDate:MonJan0215:04:0507002006RFC822:02Jan0615:04MSTRFC822Z:02Jan0615:040700RFC850:Monday,02Jan0615:04:05MSTRFC1123:Mon,02Jan200615:04:05MSTRFC1123Z:Mon,02Jan200615:04:050700RFC3339:20060102T15:04:0507:00RFC3339Nano:20060102T15:04:05。99999999907:00
  另外支持常见的Unix时间戳:Unix:1562708916orwithfractions1562708916。000000123UnixMs:1562708916414UnixUs:1562708916414123UnixNs:1562708916000000123
  自定义格式是直接传递给GO的time。Parse函数中的layout参数,如果自定义格式没有指定year,Promtail会认为应该使用系统时钟的当前年份。
  自定义格式使用的语法是使用时间戳的每个组件的特定值来定义日期和时间(例如MonJan215:04:050700MST2006),下表显示了应在自定义格式中支持的参考值。
  actiononfailure设置定义了在提取的数据中不存在source字段或时间戳解析失败的情况下,应该如何处理,支持的动作有:fudge(默认):将时间戳更改为最近的已知时间戳,总计1纳秒(以保证日志顺序)skip:不改变时间戳,保留日志被Promtail抓取的时间
  比如使用下面的pipeline配置:spanstylecolor:61aeee;lineheight:26px;spanspanstylecolor:d19a66;lineheight:26px;timestamp:span
  spanstylecolor:d19a66;lineheight:26px;source:spanspanstylecolor:98c379;lineheight:26px;timespan
  spanstylecolor:d19a66;lineheight:26px;format:spanspanstylecolor:98c379;lineheight:26px;RFC3339Nanospan
  经过上面的timestamp阶段在提取的数据中查找一个time字段,并以RFC3339Nano格式化其值(例如,20060102T15:04:05。999999907:00),所得的时间值将作为时间戳与日志行一起发送给Loki。output
  设置日志行文本,配置格式如下所示:spanstylecolor:d19a66;lineheight:26px;output:span
  spanstylecolor:d19a66;lineheight:26px;source:spanspanstylecolor:98c379;lineheight:26px;stringspan
  比如我们有一个如下配置的pipeline:spanstylecolor:61aeee;lineheight:26px;spanspanstylecolor:d19a66;lineheight:26px;json:span
  spanstylecolor:d19a66;lineheight:26px;expressions:span
  spanstylecolor:d19a66;lineheight:26px;user:spanspanstylecolor:98c379;lineheight:26px;userspan
  spanstylecolor:d19a66;lineheight:26px;message:spanspanstylecolor:98c379;lineheight:26px;messagespan
  spanstylecolor:61aeee;lineheight:26px;spanspanstylecolor:d19a66;lineheight:26px;labels:span
  spanstylecolor:d19a66;lineheight:26px;user:span
  spanstylecolor:61aeee;lineheight:26px;spanspanstylecolor:d19a66;lineheight:26px;output:span
  spanstylecolor:d19a66;lineheight:26px;source:spanspanstylecolor:98c379;lineheight:26px;messagespan
  需要收集的日志为:{spanstylecolor:d19a66;lineheight:26px;userspan:spanstylecolor:98c379;lineheight:26px;alexisspan,spanstylecolor:d19a66;lineheight:26px;messagespan:spanstylecolor:98c379;lineheight:26px;hello,world!span}
  在经过第一个json阶段后将提前以下键值对到数据中:user:alexismessage:hello,world!
  然后第二个label阶段将把useralexis添加到输出的日志标签集中,最后的output阶段将把日志数据从原来的JSON更改为message的值hello,world!输出。labels
  更新日志的标签集,并一起发送给Loki。配置格式如下所示:spanstylecolor:d19a66;lineheight:26px;labels:span
  spanstylecolor:5c6370;fontstyle:italic;lineheight:26px;Key是必须的,是将被创建的标签名称。span
  spanstylecolor:5c6370;fontstyle:italic;lineheight:26px;Values是可选的,提取的数据中的名称,其值将被用于标签的值。span
  spanstylecolor:5c6370;fontstyle:italic;lineheight:26px;如果是空的,值将被推断为与键相同。span
  spanstylecolor:98c379;lineheight:26px;〔spanspanstylecolor:98c379;lineheight:26px;string:spanspanstylecolor:98c379;lineheight:26px;〔string〕spanspanstylecolor:98c379;lineheight:26px;。。。spanspanstylecolor:98c379;lineheight:26px;〕span
  比如我们有一个如下所示的pipeline配置:spanstylecolor:61aeee;lineheight:26px;spanspanstylecolor:d19a66;lineheight:26px;json:span
  spanstylecolor:d19a66;lineheight:26px;expressions:span
  spanstylecolor:d19a66;lineheight:26px;stream:spanspanstylecolor:98c379;lineheight:26px;streamspan
  spanstylecolor:61aeee;lineheight:26px;spanspanstylecolor:d19a66;lineheight:26px;labels:span
  spanstylecolor:d19a66;lineheight:26px;stream:span
  需要处理的日志数据为:{
  spanstylecolor:d19a66;lineheight:26px;logspan:spanstylecolor:98c379;lineheight:26px;logmessagespan,
  spanstylecolor:d19a66;lineheight:26px;streamspan:spanstylecolor:98c379;lineheight:26px;stderrspan,
  spanstylecolor:d19a66;lineheight:26px;timespan:spanstylecolor:98c379;lineheight:26px;20190430T02:12:41。8443515Zspan
  }
  第一个json阶段将提取stream到Map数据中,其值为stderr。然后在第二个labels阶段将把这个键值对变成一个标签,在发送到Loki的日志行中将包括标签stream,值为stderr。metrics
  根据提取的数据计算指标。需要注意的是,创建的metrics指标不会被推送到Loki,而是通过Promtail的metrics端点暴露出去,Prometheus应该被配置为可以抓取Promtail的指标,以便能够检索这个阶段所配置的指标数据。
  配置格式如下所示:spanstylecolor:5c6370;fontstyle:italic;lineheight:26px;一个映射,key为metric的名称,value是特定的metric类型span
  spanstylecolor:d19a66;lineheight:26px;metrics:span
  spanstylecolor:98c379;lineheight:26px;〔string:spanspanstylecolor:98c379;lineheight:26px;〔spanspanstylecolor:98c379;lineheight:26px;metriccounterspanspanstylecolor:98c379;lineheight:26px;spanspanstylecolor:98c379;lineheight:26px;metricgaugespanspanstylecolor:98c379;lineheight:26px;spanspanstylecolor:98c379;lineheight:26px;metrichistogramspanspanstylecolor:98c379;lineheight:26px;〕spanspanstylecolor:98c379;lineheight:26px;。。。〕span
  metriccounter:定义一个Counter类型的指标,其值只会不断增加。metricgauge:定义一个Gauge类型的指标,其值可以增加或减少。metrichistogram:定义一个直方图指标。
  比如我们有一个如下所示的pipeline配置用于定义一个Counter指标:spanstylecolor:61aeee;lineheight:26px;spanspanstylecolor:d19a66;lineheight:26px;metrics:span
  spanstylecolor:d19a66;lineheight:26px;loglinestotal:span
  spanstylecolor:d19a66;lineheight:26px;type:spanspanstylecolor:98c379;lineheight:26px;Counterspan
  spanstylecolor:d19a66;lineheight:26px;description:spanspanstylecolor:98c379;lineheight:26px;totalnumberofloglinesspan
  spanstylecolor:d19a66;lineheight:26px;prefix:spanspanstylecolor:98c379;lineheight:26px;mypromtailcustomspan
  spanstylecolor:d19a66;lineheight:26px;maxidleduration:spanspanstylecolor:98c379;lineheight:26px;24hspan
  spanstylecolor:d19a66;lineheight:26px;config:span
  spanstylecolor:d19a66;lineheight:26px;matchall:spanspanstylecolor:56b6c2;lineheight:26px;truespan
  spanstylecolor:d19a66;lineheight:26px;action:spanspanstylecolor:98c379;lineheight:26px;incspan
  spanstylecolor:d19a66;lineheight:26px;logbytestotal:span
  spanstylecolor:d19a66;lineheight:26px;type:spanspanstylecolor:98c379;lineheight:26px;Counterspan
  spanstylecolor:d19a66;lineheight:26px;description:spanspanstylecolor:98c379;lineheight:26px;totalbytesofloglinesspan
  spanstylecolor:d19a66;lineheight:26px;prefix:spanspanstylecolor:98c379;lineheight:26px;mypromtailcustomspan
  spanstylecolor:d19a66;lineheight:26px;maxidleduration:spanspanstylecolor:98c379;lineheight:26px;24hspan
  spanstylecolor:d19a66;lineheight:26px;config:span
  spanstylecolor:d19a66;lineheight:26px;matchall:spanspanstylecolor:56b6c2;lineheight:26px;truespan
  spanstylecolor:d19a66;lineheight:26px;countentrybytes:spanspanstylecolor:56b6c2;lineheight:26px;truespan
  spanstylecolor:d19a66;lineheight:26px;action:spanspanstylecolor:98c379;lineheight:26px;addspan
  这个流水线先创建了一个loglinestotal的Counter,通过使用matchall:true参数为每一个接收到的日志行增加。
  然后还创建了一个logbytestotal的Counter指标,通过使用countentrybytes:true参数,将收到的每个日志行的字节大小加入到指标中。
  这两个指标如果没有收到新的数据,将在24h后小时。另外这些阶段应该放在pipeline的末端,在任何标签阶段之后。spanstylecolor:61aeee;lineheight:26px;spanspanstylecolor:d19a66;lineheight:26px;regex:span
  spanstylecolor:d19a66;lineheight:26px;expression:spanspanstylecolor:98c379;lineheight:26px;。(?Pordersuccessordersuccessful)。span
  spanstylecolor:61aeee;lineheight:26px;spanspanstylecolor:d19a66;lineheight:26px;metrics:span
  spanstylecolor:d19a66;lineheight:26px;successfulorderstotal:span
  spanstylecolor:d19a66;lineheight:26px;type:spanspanstylecolor:98c379;lineheight:26px;Counterspan
  spanstylecolor:d19a66;lineheight:26px;description:spanspanstylecolor:98c379;lineheight:26px;loglineswiththemessageordersuccessfulspan
  spanstylecolor:d19a66;lineheight:26px;source:spanspanstylecolor:98c379;lineheight:26px;ordersuccessspan
  spanstylecolor:d19a66;lineheight:26px;config:span
  spanstylecolor:d19a66;lineheight:26px;action:spanspanstylecolor:98c379;lineheight:26px;incspan
  比如上面这个pipeline首先尝试在日志中找到成功的订单,将其提取为ordersuccess字段,然后在metrics阶段创建一个名为successfulorderstotal的Counter指标,其值是在只有提取的数据中有ordersuccess的时候才会增加。这个pipeline的结果是一个指标,其值只有在Promtail抓取的日志中带有ordersuccessful文本的日志时才会增加。spanstylecolor:61aeee;lineheight:26px;spanspanstylecolor:d19a66;lineheight:26px;regex:span
  spanstylecolor:d19a66;lineheight:26px;expression:spanspanstylecolor:98c379;lineheight:26px;。orderstatus(?Porderstatus。?)。span
  spanstylecolor:61aeee;lineheight:26px;spanspanstylecolor:d19a66;lineheight:26px;metrics:span
  spanstylecolor:d19a66;lineheight:26px;successfulorderstotal:span
  spanstylecolor:d19a66;lineheight:26px;type:spanspanstylecolor:98c379;lineheight:26px;Counterspan
  spanstylecolor:d19a66;lineheight:26px;description:spanspanstylecolor:98c379;lineheight:26px;successfulordersspan
  spanstylecolor:d19a66;lineheight:26px;source:spanspanstylecolor:98c379;lineheight:26px;orderstatusspan
  spanstylecolor:d19a66;lineheight:26px;config:span
  spanstylecolor:d19a66;lineheight:26px;value:spanspanstylecolor:98c379;lineheight:26px;successspan
  spanstylecolor:d19a66;lineheight:26px;action:spanspanstylecolor:98c379;lineheight:26px;incspan
  spanstylecolor:d19a66;lineheight:26px;failedorderstotal:span
  spanstylecolor:d19a66;lineheight:26px;type:spanspanstylecolor:98c379;lineheight:26px;Counterspan
  spanstylecolor:d19a66;lineheight:26px;description:spanspanstylecolor:98c379;lineheight:26px;failedordersspan
  spanstylecolor:d19a66;lineheight:26px;source:spanspanstylecolor:98c379;lineheight:26px;orderstatusspan
  spanstylecolor:d19a66;lineheight:26px;config:span
  spanstylecolor:d19a66;lineheight:26px;value:spanspanstylecolor:98c379;lineheight:26px;failspan
  spanstylecolor:d19a66;lineheight:26px;action:spanspanstylecolor:98c379;lineheight:26px;incspan
  上面这个pipeline首先会尝试在日志中找到格式为orderstatusvalue的文本,将value提取到orderstatus中。该指标阶段创建了successfulorderstotal和failedorderstotal指标,只有当提取数据中的orderstatus的值分别为success或fail时才会增加。tenant
  设置日志要使用的租户ID值,从提取数据中的一个字段获取,如果该字段缺失,将使用默认的Promtail客户端租户ID。配置格式如下所示:spanstylecolor:d19a66;lineheight:26px;tenant:span
  spanstylecolor:5c6370;fontstyle:italic;lineheight:26px;source或value配置选项是必须的,但二者不能同时使用(它们是互斥的)span
  spanstylecolor:98c379;lineheight:26px;〔spanspanstylecolor:d19a66;lineheight:26px;source:spanspanstylecolor:98c379;lineheight:26px;stringspanspanstylecolor:98c379;lineheight:26px;〕span
  spanstylecolor:5c6370;fontstyle:italic;lineheight:26px;当前阶段执行时用来设置租户ID的值。span
  spanstylecolor:5c6370;fontstyle:italic;lineheight:26px;当这个阶段被包含在一个带有match的条件管道中时非常有用。span
  spanstylecolor:98c379;lineheight:26px;〔spanspanstylecolor:d19a66;lineheight:26px;value:spanspanstylecolor:98c379;lineheight:26px;stringspanspanstylecolor:98c379;lineheight:26px;〕span
  比如我们有如下所示的pipeline配置:spanstylecolor:d19a66;lineheight:26px;pipelinestages:span
  spanstylecolor:61aeee;lineheight:26px;spanspanstylecolor:d19a66;lineheight:26px;json:span
  spanstylecolor:d19a66;lineheight:26px;expressions:span
  spanstylecolor:d19a66;lineheight:26px;customerid:spanspanstylecolor:98c379;lineheight:26px;customeridspan
  spanstylecolor:61aeee;lineheight:26px;spanspanstylecolor:d19a66;lineheight:26px;tenant:span
  spanstylecolor:d19a66;lineheight:26px;source:spanspanstylecolor:98c379;lineheight:26px;customeridspan
  需要获取的日志数据为:{
  spanstylecolor:d19a66;lineheight:26px;customeridspan:spanstylecolor:98c379;lineheight:26px;1span,
  spanstylecolor:d19a66;lineheight:26px;logspan:spanstylecolor:98c379;lineheight:26px;logmessagespan,
  spanstylecolor:d19a66;lineheight:26px;streamspan:spanstylecolor:98c379;lineheight:26px;stderrspan,
  spanstylecolor:d19a66;lineheight:26px;timespan:spanstylecolor:98c379;lineheight:26px;20190430T02:12:41。8443515Zspan
  }
  第一个json阶段将提取customerid的值到Map中,值为1。在第二个租户阶段将把XScopeOrgID请求Header头(Loki用来识别租户)设置为提取的customerid的值,也就是1。
  另外一种场景是用配置的值来覆盖租户ID,如下所示的pipeline配置:spanstylecolor:d19a66;lineheight:26px;pipelinestages:span
  spanstylecolor:61aeee;lineheight:26px;spanspanstylecolor:d19a66;lineheight:26px;json:span
  spanstylecolor:d19a66;lineheight:26px;expressions:span
  spanstylecolor:d19a66;lineheight:26px;app:span
  spanstylecolor:d19a66;lineheight:26px;message:span
  spanstylecolor:61aeee;lineheight:26px;spanspanstylecolor:d19a66;lineheight:26px;labels:span
  spanstylecolor:d19a66;lineheight:26px;app:span
  spanstylecolor:61aeee;lineheight:26px;spanspanstylecolor:d19a66;lineheight:26px;match:span
  spanstylecolor:d19a66;lineheight:26px;selector:spanspanstylecolor:98c379;lineheight:26px;{appapi}span
  spanstylecolor:d19a66;lineheight:26px;stages:span
  spanstylecolor:61aeee;lineheight:26px;spanspanstylecolor:d19a66;lineheight:26px;tenant:span
  spanstylecolor:d19a66;lineheight:26px;value:spanspanstylecolor:98c379;lineheight:26px;teamapispan
  spanstylecolor:61aeee;lineheight:26px;spanspanstylecolor:d19a66;lineheight:26px;output:span
  spanstylecolor:d19a66;lineheight:26px;source:spanspanstylecolor:98c379;lineheight:26px;messagespan
  需要收集的日志数据为:{
  spanstylecolor:d19a66;lineheight:26px;appspan:spanstylecolor:98c379;lineheight:26px;apispan,
  spanstylecolor:d19a66;lineheight:26px;logspan:spanstylecolor:98c379;lineheight:26px;logmessagespan,
  spanstylecolor:d19a66;lineheight:26px;streamspan:spanstylecolor:98c379;lineheight:26px;stderrspan,
  spanstylecolor:d19a66;lineheight:26px;timespan:spanstylecolor:98c379;lineheight:26px;20190430T02:12:41。8443515Zspan
  }
  这个pipeline将:DecodeJSON日志设置标签appapi处理匹配阶段,检查{appapi}选择器是否匹配,如果匹配了则执行子阶段,也就是这里的租户阶段,覆盖值为teamapi的租户。
  此外在处理阶段还有labeldrop阶段,它从标签集中删除标签,这些标签与日志条目一起被发送到Loki。还有一个labelallow阶段,它只允许将所提供的标签包含在与日志条目一起发送给Loki的标签集中。过滤阶段
  可选择应用一个阶段的子集,或根据一些条件删除日志数据。match
  当一个日志条目与可配置的LogQL流选择器和过滤表达式相匹配时,有条件地应用一组阶段或删除日志数据。配置语法格式如下所示:spanstylecolor:d19a66;lineheight:26px;match:span
  spanstylecolor:5c6370;fontstyle:italic;lineheight:26px;LogQL流选择器合过滤表达式。span
  spanstylecolor:d19a66;lineheight:26px;selector:spanspanstylecolor:98c379;lineheight:26px;stringspan
  spanstylecolor:5c6370;fontstyle:italic;lineheight:26px;pipeline名称,当定义的时候,在pipelinedurationseconds直方图中创建一个额外的标签,该值与jobname使用下划线连接。span
  spanstylecolor:98c379;lineheight:26px;〔pipelinename:spanspanstylecolor:98c379;lineheight:26px;string〕span
  spanstylecolor:5c6370;fontstyle:italic;lineheight:26px;决定当选择器与日志行匹配时采取什么动作。span
  spanstylecolor:5c6370;fontstyle:italic;lineheight:26px;默认是keep,当设置为drop时,日志将被删除,以后的指标将不会被记录。span
  spanstylecolor:98c379;lineheight:26px;〔action:spanspanstylecolor:98c379;lineheight:26px;stringspanspanstylecolor:98c379;lineheight:26px;spanspanstylecolor:98c379;lineheight:26px;defaultspanspanstylecolor:98c379;lineheight:26px;spanspanstylecolor:98c379;lineheight:26px;keepspanspanstylecolor:98c379;lineheight:26px;〕span
  spanstylecolor:5c6370;fontstyle:italic;lineheight:26px;如果你指定了action:drop那么logentrydroppedlinestotal这个指标将为每一个被丢弃的行而增加span
  spanstylecolor:5c6370;fontstyle:italic;lineheight:26px;默认情况下,reaseon标签是matchstage,但是你可以选择指定一个自定义值用于该指标的reason标签。span
  spanstylecolor:98c379;lineheight:26px;〔dropcounterreason:spanspanstylecolor:98c379;lineheight:26px;stringspanspanstylecolor:98c379;lineheight:26px;spanspanstylecolor:98c379;lineheight:26px;defaultspanspanstylecolor:98c379;lineheight:26px;spanspanstylecolor:98c379;lineheight:26px;matchstagespanspanstylecolor:98c379;lineheight:26px;〕span
  spanstylecolor:5c6370;fontstyle:italic;lineheight:26px;只有当选择器与日志的标签相匹配时,才会出现嵌套的流水线阶段:span
  spanstylecolor:d19a66;lineheight:26px;stages:span
  spanstylecolor:61aeee;lineheight:26px;spanspanstylecolor:98c379;lineheight:26px;〔span
  spanstylecolor:98c379;lineheight:26px;regexstagespan
  spanstylecolor:98c379;lineheight:26px;jsonstagespanspanstylecolor:98c379;lineheight:26px;
  templatestage
  matchstage
  timestampstage
  outputstage
  labelsstage
  metricsstage
  tenantstage
  spanspanstylecolor:98c379;lineheight:26px;〕span
  比如我们现在有一个如下所示的pipeline配置:spanstylecolor:d19a66;lineheight:26px;pipelinestages:span
  spanstylecolor:61aeee;lineheight:26px;spanspanstylecolor:d19a66;lineheight:26px;json:span
  spanstylecolor:d19a66;lineheight:26px;expressions:span
  spanstylecolor:d19a66;lineheight:26px;app:span
  spanstylecolor:61aeee;lineheight:26px;spanspanstylecolor:d19a66;lineheight:26px;labels:span
  spanstylecolor:d19a66;lineheight:26px;app:span
  spanstylecolor:61aeee;lineheight:26px;spanspanstylecolor:d19a66;lineheight:26px;match:span
  spanstylecolor:d19a66;lineheight:26px;selector:spanspanstylecolor:98c379;lineheight:26px;{apploki}span
  spanstylecolor:d19a66;lineheight:26px;stages:span
  spanstylecolor:61aeee;lineheight:26px;spanspanstylecolor:d19a66;lineheight:26px;json:span
  spanstylecolor:d19a66;lineheight:26px;expressions:span
  spanstylecolor:d19a66;lineheight:26px;msg:spanspanstylecolor:98c379;lineheight:26px;messagespan
  spanstylecolor:61aeee;lineheight:26px;spanspanstylecolor:d19a66;lineheight:26px;match:span
  spanstylecolor:d19a66;lineheight:26px;pipelinename:spanspanstylecolor:98c379;lineheight:26px;app2span
  spanstylecolor:d19a66;lineheight:26px;selector:spanspanstylecolor:98c379;lineheight:26px;{apppokey}span
  spanstylecolor:d19a66;lineheight:26px;action:spanspanstylecolor:98c379;lineheight:26px;keepspan
  spanstylecolor:d19a66;lineheight:26px;stages:span
  spanstylecolor:61aeee;lineheight:26px;spanspanstylecolor:d19a66;lineheight:26px;json:span
  spanstylecolor:d19a66;lineheight:26px;expressions:span
  spanstylecolor:d19a66;lineheight:26px;msg:spanspanstylecolor:98c379;lineheight:26px;msgspan
  spanstylecolor:61aeee;lineheight:26px;spanspanstylecolor:d19a66;lineheight:26px;match:span
  spanstylecolor:d19a66;lineheight:26px;selector:spanspanstylecolor:98c379;lineheight:26px;{apppromtail}。noisyerror。span
  spanstylecolor:d19a66;lineheight:26px;action:spanspanstylecolor:98c379;lineheight:26px;dropspan
  spanstylecolor:d19a66;lineheight:26px;dropcounterreason:spanspanstylecolor:98c379;lineheight:26px;promtailnoisyerrorspan
  spanstylecolor:61aeee;lineheight:26px;spanspanstylecolor:d19a66;lineheight:26px;output:span
  spanstylecolor:d19a66;lineheight:26px;source:spanspanstylecolor:98c379;lineheight:26px;msgspan
  要处理的日志数据为:{spanstylecolor:d19a66;lineheight:26px;timespan:spanstylecolor:98c379;lineheight:26px;20121101T22:08:4100:00span,spanstylecolor:d19a66;lineheight:26px;appspan:spanstylecolor:98c379;lineheight:26px;lokispan,spanstylecolor:d19a66;lineheight:26px;componentspan:〔spanstylecolor:98c379;lineheight:26px;parserspan,spanstylecolor:98c379;lineheight:26px;typespan〕,spanstylecolor:d19a66;lineheight:26px;levelspan:spanstylecolor:98c379;lineheight:26px;WARNspan,spanstylecolor:d19a66;lineheight:26px;messagespan:spanstylecolor:98c379;lineheight:26px;app1loglinespan}
  {spanstylecolor:d19a66;lineheight:26px;timespan:spanstylecolor:98c379;lineheight:26px;20121101T22:08:4100:00span,spanstylecolor:d19a66;lineheight:26px;appspan:spanstylecolor:98c379;lineheight:26px;promtailspan,spanstylecolor:d19a66;lineheight:26px;componentspan:〔spanstylecolor:98c379;lineheight:26px;parserspan,spanstylecolor:98c379;lineheight:26px;typespan〕,spanstylecolor:d19a66;lineheight:26px;levelspan:spanstylecolor:98c379;lineheight:26px;ERRORspan,spanstylecolor:d19a66;lineheight:26px;messagespan:spanstylecolor:98c379;lineheight:26px;foonoisyerrorspan}
  第一个json阶段将在第一个日志行的提取Map数据中添加值apploki,然后经过第二个labels阶段将app转换成一个标签。对于第二行日志也遵循同样的流程,只是值变成了promtail。
  然后在第三个match阶段使用LogQL表达式{apploki}进行匹配,只有在标签apploki的时候才会执行嵌套json阶段,这里合我们的第一行日志是匹配的,然后嵌套的json阶段将message数据提取到Map数据中,key变成了msg,值为app1logline。
  接下来执行第四个match阶段,需要匹配apppokey,很显然这里我们都不匹配,所以嵌套的json子阶段不会被执行。
  然后执行的第五个match阶段,将会删掉任何具有apppromtail标签并包括noisyerror文本的日志数据,并且还将增加logentrydroplinestotal指标,标签为reasonpromtailnoisyerror。
  最后的output输出阶段将日志行的内容改为提取数据中的msg的值。我们这里的示例最后输出为app1logline。drop
  drop阶段可以让我们根据配置来删除日志。需要注意的是,如果你提供多个选项配置,它们将被视为AND子句,其中每个选项必须为真才能删除日志。如果你想用一个OR子句来删除,那么就指定多个删除阶段。配置语法格式如下所示:spanstylecolor:d19a66;lineheight:26px;drop:span
  spanstylecolor:98c379;lineheight:26px;〔source:spanspanstylecolor:98c379;lineheight:26px;string〕span
  spanstylecolor:5c6370;fontstyle:italic;lineheight:26px;RE2正则表达式,如果提供了source,则会尝试匹配sourcespan
  spanstylecolor:5c6370;fontstyle:italic;lineheight:26px;如果没有提供source,则会尝试匹配日志行数据span
  spanstylecolor:5c6370;fontstyle:italic;lineheight:26px;如果提供的正则匹配了日志行或者source,则该行日志将被删除。span
  spanstylecolor:98c379;lineheight:26px;〔expression:spanspanstylecolor:98c379;lineheight:26px;string〕span
  spanstylecolor:5c6370;fontstyle:italic;lineheight:26px;只有在指定source源的情况下才能指定value值。span
  spanstylecolor:5c6370;fontstyle:italic;lineheight:26px;指定value与regex是错误的。span
  spanstylecolor:5c6370;fontstyle:italic;lineheight:26px;如果提供的值与source完全匹配,该行将被删除。span
  spanstylecolor:98c379;lineheight:26px;〔value:spanspanstylecolor:98c379;lineheight:26px;string〕span
  spanstylecolor:5c6370;fontstyle:italic;lineheight:26px;olderthan被解析为Goduration格式span
  spanstylecolor:5c6370;fontstyle:italic;lineheight:26px;如果日志行的时间戳大于当前时间减去所提供的时间,则将被删除span
  spanstylecolor:98c379;lineheight:26px;〔olderthan:spanspanstylecolor:98c379;lineheight:26px;duration〕span
  spanstylecolor:5c6370;fontstyle:italic;lineheight:26px;longerthan是一个以bytes为单位的值,任何超过这个值的日志行都将被删除。span
  spanstylecolor:5c6370;fontstyle:italic;lineheight:26px;可以指定为整数格式的字节数:8192,或者带后缀的8kbspan
  spanstylecolor:98c379;lineheight:26px;〔longerthan:spanspanstylecolor:98c379;lineheight:26px;stringint〕span
  spanstylecolor:5c6370;fontstyle:italic;lineheight:26px;每当一个日志行数据被删除,指标logentrydroppedlinestotal都会增加。span
  spanstylecolor:5c6370;fontstyle:italic;lineheight:26px;默认的reason标签是dropstage,然而你可以选择指定一个自定义值,用于该指标的reason标签。span
  spanstylecolor:98c379;lineheight:26px;〔dropcounterreason:spanspanstylecolor:98c379;lineheight:26px;stringspanspanstylecolor:98c379;lineheight:26px;spanspanstylecolor:98c379;lineheight:26px;defaultspanspanstylecolor:98c379;lineheight:26px;spanspanstylecolor:98c379;lineheight:26px;dropstagespanspanstylecolor:98c379;lineheight:26px;〕span
  比如我们有一个如下所示的简单drop阶段配置:spanstylecolor:61aeee;lineheight:26px;spanspanstylecolor:d19a66;lineheight:26px;drop:span
  spanstylecolor:d19a66;lineheight:26px;expression:spanspanstylecolor:98c379;lineheight:26px;。debug。span
  该阶段将删除任何带有debug字样的日志行。
  如果是下面的配置示例:spanstylecolor:61aeee;lineheight:26px;spanspanstylecolor:d19a66;lineheight:26px;json:span
  spanstylecolor:d19a66;lineheight:26px;expressions:span
  spanstylecolor:d19a66;lineheight:26px;level:span
  spanstylecolor:d19a66;lineheight:26px;msg:span
  spanstylecolor:61aeee;lineheight:26px;spanspanstylecolor:d19a66;lineheight:26px;drop:span
  spanstylecolor:d19a66;lineheight:26px;source:spanspanstylecolor:98c379;。。。

腾讯李强从数实融合角度推动全真互联21世纪经济报道记者白杨北京报道在9月1日召开的2022世界人工智能大会产业发展论坛上,腾讯集团副总裁政企业务总裁李强表示,腾讯更多的是从数实融合的角度来关注全真互联。据其介绍,全京东航空正式投入运营货运航空迎来新竞争者本报记者裴昱北京报道8月31日,江苏京东货运航空有限公司(以下简称京东航空)获得中国民航局颁发的CCAR121部航空承运人运行合格证。这意味着,京东航空正式投入运营。民航局相关资料高智慧到底是怎样产生的高智慧到底是怎样产生的高智慧与低智慧有本质的区别,但是原初的智慧是相同的。所以,要论证清楚高智慧到底是怎样产生的,就需要彻底追根寻源,避免陷入抽象概念的理论假设而自欺欺人。科学研究从鸽子窝中掏到了黄金在创世的争论中,伽莫夫的大爆炸理论仅能产生3种元素,而霍伊尔的恒星核合成理论则能产生90余种元素。而且,恒星核合成理论完全能重现宇宙元素丰度指纹。因此,在这一回合中,霍伊尔取得了大新赛季控卫薪资榜沃尔ampampamp威少怒赚4700万库里名列榜首当今的NBA联盟中,控卫是最重要的角色。在202223赛季,联盟收入前三的球员都是控卫,并且值得一提的是,联盟前十收入中有4名球员是控卫,前而是名球员中有多达7名是控卫。显然,想要有比赛看了!女篮开启亚青赛,3天3战,小组赛末战碰上强敌日本队北京时间9月1日消息,时间好快,转眼进入9月了,中国U18女篮开启新征程,前往印度参加U18亚青赛。按照赛程来看,中国国青女篮3天3战,小组赛末战将会碰上强敌日本队,对于中国队来说体坛早报(2022。9。1)球类运动足球北京时间8月31日,中超第12轮补赛,上海申花在中立主场大连金州体育场对阵山东泰山。本场比赛主裁判是张雷,VAR是麦麦提江。上半场孙准浩射门造金洋洋乌龙,之后莫伊塞斯与曼城签约多特蒙德后卫阿坎吉这位27岁的球员从多特蒙德加盟,自2018年1月以来,他已经出场158次。阿坎吉为瑞士出场41次,并在他们的世界杯预选赛中发挥了关键作用。我很高兴来到这里,我已经迫不及待要开始了。萨拉赫两次助攻,利物浦2比1绝杀纽卡斯尔文羊城晚报全媒体记者刘毅9月1日凌晨在英超第5轮比赛中,利物浦坐镇主场迎来劲敌纽卡斯尔,凭借小将卡瓦略在伤停补时第8分钟的绝杀进球,以2比1完成逆转。作为上赛季两位英超金靴奖得主之从猿到人如何进化,让基因告诉你长期以来,我们大多数关于人类进化的知识都来自化石。可是,发现化石毕竟是件碰运气的事,而且化石资料往往缺失严重,要想单纯依靠它们来勾勒出一幅完整的人类进化图,就好比一张被撕碎的照片,CBA新赛季开赛在即!说说下赛季哪些球队能进入季后赛(一)沸沸扬扬的CBA休赛期就要结束了!球员转会虽然风声大,雨点小,但还是有一些实力球员,转换了球队,如朱旭航,丁彦雨航,周鹏,高诗岩,刘志轩等。我们来分析一下下赛季可能进入季后赛的球队
让我陪你过个冬作者朗读醉过知酒浓是不是有点儿冷西边吹来了无情的风芬芳的季节从树上凋零落叶哭泣丢失了年龄当你皱纹里也有了忧郁我想陪你过个冬寒夜把梦想冰封忧伤淋湿了你的颜容岁月半盏茶凉窗外的夜里有颗酒局百态朋友之间,哪能没有酒?几天不喝添忧愁。初时,推杯换盏,礼让有加稍顷,言语粗鲁,原形毕露。三碗下肚哪管它天旋地转,胡抡八侃只吹得九州无活牛天下事无所不晓,人世间哪有我插不上的口?唾沫女孩,请你别再轻视自己头条创作挑战赛在刷到第十个王宝钏挖野菜的视频之后,我就明显坐不住了,一股愤然之气贯穿此中,用18年的等待换来18天的浪子回头,这一生真的值吗?无论是人心已变还是岁月无情,以我个人的纽约的孤独我常常会连续几个晚上都做梦(),梦中的情景在辰时半梦半醒之间会格外的清晰,于是我就用心地记忆我的梦境,并编写了一部梦境集纽约的冬天是干冷的,这样的感觉在从百货店里购物刚刚走出来的时和无趣的人相处,厌倦是迟早的事情免责声明文章系转载,著作权署名权归原作者。和缺乏好奇心的人生活在一起,厌倦是迟早的事情。但很多人没有在关系的初期注意到这一点。如果自认为还算一个对世界有点好奇心的人,找到的另一半是作文素材18篇满分作文及范文详解,助力满分作文01hr01熟悉的地方也有风景一声渺远却嘹亮的鸡啼中,熟睡的小镇打个哈欠,揉揉惺忪的睡眼,渐渐地苏醒过来。小镇繁忙而又安适的一天开始了!我背上书包,蹑手蹑脚地下楼,生怕吵醒了仍在熟男人杀掉,女人吃掉,汉族至暗时刻五胡乱华在我们中华民族五千年的历史中,有一段令人震惊的黑暗时期,这一时期的汉族人从1200万锐减至400万,人口减少了800万人,甚至差点灭族,这个时期就是臭名昭著的五胡乱华。五胡乱华公元上了年纪的女人穿大衣,搭裤子还是搭裙子?知道这3点高级显贵步入中年的女人买衣服难,搭衣服更难。在容貌身材不占优势的情况下,中年女人在打扮上稍微草率一点就容易出现大妈感,让自己看起来比真实年龄更老气。尤其是到了穿衣繁琐的秋冬季,我们更不能随国家能源局目前采暖季用气合同已基本落实,地下储气库注气进度执行良好国家能源局官网消息,11月14日,国家能源局召开四季度网上新闻发布会。国家能源局发展规划司副司长董万成在会上表示,充分发挥煤炭煤电兜底保障作用,持续释放煤炭先进产能,加强重点产煤地国家发改委猪肉价格回落至二级预警中新经纬11月15日电据国家发展改革委公众号15日消息,猪肉价格回落至二级预警区间。监测显示,11月7日11日当周,36个大中城市精瘦肉零售价格周均价同比涨幅由超过40收窄至304得物否认擅自删除用户视频,系清理缓存专家仍需用户同意近日,网友爆料得物App疑似擅自远程删除其手机视频一事引发持续关注。11月13日,得物方面回应称,并未删除原视频,只清理了缓存文件,而清理缓存是为了缩短视频上传时间,以及不占用手机
友情链接:快好找快生活快百科快传网中准网文好找聚热点快软网