是否有任何方法配置promtail,通过https-ingress将日志发送到loki?
promtail
我使用了这个舵图前尾,并将洛基url配置为http://gateway.loki.monitoring.example.com:80/loki/api/v1/push。在部署promtail图表之后,我在promtail pod中看到了下面的错误
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,但仍然失败。
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-distributed图表的入口如下( rest入口配置是默认的)...
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
...我错过了洛基的任何入口配置吗?
发布于 2022-03-28 18:44:24
玩了一段时间之后,我明白我需要删除端口,并为loki指定https。应该如下所示
https://gateway.loki.monitoring.example.com/loki/api/v1/pushhttps://stackoverflow.com/questions/71649098
复制相似问题