首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >带有helm的https入口配置背后的Loki

带有helm的https入口配置背后的Loki
EN

Stack Overflow用户
提问于 2022-03-28 14:29:36
回答 1查看 1.6K关注 0票数 1

是否有任何方法配置promtail,通过https-ingress将日志发送到loki?

promtail

我使用了这个舵图前尾,并将洛基url配置为http://gateway.loki.monitoring.example.com:80/loki/api/v1/push。在部署promtail图表之后,我在promtail pod中看到了下面的错误

代码语言:javascript
复制
level=error ts=2022-03-28T14:10:23.740581978Z caller=client.go:360 component=client host=gateway.loki.monitoring.example.com:80 msg="f
inal error sending batch" status=308 error="server returned HTTP status 308 Permanent Redirect (308): <html>"

我甚至将loki中的https指定为https://gateway.loki.monitoring.example.com:80/loki/api/v1/push,但仍然失败。

代码语言:javascript
复制
level=warn ts=2022-03-28T14:27:47.976570998Z caller=client.go:349 component=client host=gateway.loki.monitoring.example:80 msg="er
ror sending batch, will retry" status=-1 error="Post \"https://gateway.loki.monitoring.example.com:80/loki/api/v1/push\": http: server
 gave HTTP response to HTTPS client"

我找到了这个配置https://grafana.com/docs/loki/latest/installation/helm/#run-loki-behind-https-ingress,但是它已经过时了。

注意:

  • 我还没有在loki侧配置任何https。
  • 配置的loki-distributed图表的入口如下( rest入口配置是默认的)
代码语言:javascript
复制
...
  ingress:
    # -- Specifies whether an ingress for the gateway should be created
    enabled: true
    # -- Ingress Class Name. MAY be required for Kubernetes versions >= 1.18
    ingressClassName: monitoring-ingress
    # -- Annotations for the gateway ingress
    annotations:
      cert-manager.io/cluster-issuer: monitoring-cluster-issuer
    # -- Hosts configuration for the gateway ingress
    hosts:
      - host: gateway.loki.monitoring.example.com
        paths:
          - path: /
            # -- pathType (e.g. ImplementationSpecific, Prefix, .. etc.) might also be required by some Ingress Controllers
            pathType: Prefix
    # -- TLS configuration for the gateway ingress
    tls:
      - secretName: loki-gateway-tls-certs
        hosts:
          - gateway.loki.monitoring.example.com
...

我错过了洛基的任何入口配置吗?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2022-03-28 18:44:24

玩了一段时间之后,我明白我需要删除端口,并为loki指定https。应该如下所示

代码语言:javascript
复制
https://gateway.loki.monitoring.example.com/loki/api/v1/push
票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/71649098

复制
相关文章

相似问题

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