我用头盔安装洛基和普罗米修斯。不过,我想在一个地方更换原木。我使用了: helm显示值grafana/loki-堆栈>loki-堆栈-value. and来输出这些值,并得到以下结果:
loki:
enabled: true
isDefault: true
promtail:
enabled: true
config:
lokiAddress: http://{{ .Release.Name }}:3100/loki/api/v1/push
prometheusSpec:
additionalScrapeConfigs:
- match:
selector: '{name="promtail"}'
stages:
# The regex stage parses out a level, timestamp, and component. At the end
# of the stage, the values for level, timestamp, and component are only
# set internally for the pipeline. Future stages can use these values and
# decide what to do with them.
- regex:
expression: '.*level=(?P<level>[a-zA-Z]+).*ts=(?P<timestamp>[T\d-:.Z]*).*component=(?P<component>[a-zA-Z]+)'实际上,一切都会很顺利的。但是我的输出非常奇怪,所以我尝试添加additionalScapeConfig
2022-05-06 18:31:55
{"log":"2022-05-06T18:31:55,003 \u001b[36mDEBUG\u001b[m因此,关于这个问题:
如何使用helm安装dlp-dev-loki grafana/loki堆栈-值loki堆栈-value. use -n dev.而其他的景观则透露出自己的心得。
发布于 2022-09-23 20:04:11
根据docs,尾管线,时间戳阶段采用从regex阶段提取的时间戳,并将其提升为日志条目的新时间戳,时间戳应该将其解析为new 3339 new格式的值。将下面的内容添加到regex下面的配置文件中。
- timestamp:
format: RFC3339Nano
source: timestamphttps://stackoverflow.com/questions/72144846
复制相似问题