首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Helm Loki Stack附加promtail配置

Helm Loki Stack附加promtail配置
EN

Stack Overflow用户
提问于 2022-05-06 16:41:47
回答 1查看 1.3K关注 0票数 1

我用头盔安装洛基和普罗米修斯。不过,我想在一个地方更换原木。我使用了: helm显示值grafana/loki-堆栈>loki-堆栈-value. and来输出这些值,并得到以下结果:

代码语言:javascript
复制
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

代码语言:javascript
复制
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.而其他的景观则透露出自己的心得。

EN

回答 1

Stack Overflow用户

发布于 2022-09-23 20:04:11

根据docs,尾管线,时间戳阶段采用从regex阶段提取的时间戳,并将其提升为日志条目的新时间戳,时间戳应该将其解析为new 3339 new格式的值。将下面的内容添加到regex下面的配置文件中。

代码语言:javascript
复制
- timestamp:
    format: RFC3339Nano
    source: timestamp
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/72144846

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档