首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Prometheus远程写mTLS

Prometheus远程写mTLS
EN

Stack Overflow用户
提问于 2022-02-23 21:59:57
回答 1查看 666关注 0票数 2

我正在尝试建立Prometheus到Prometheus的度量流,我能够通过标志--enable-feature=remote-write-receiver来实现它。

但是,我需要有mTLS,有人可以建议手册或张贴配置示例吗?

感谢你的帮助

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2022-02-24 06:08:59

还有第二个配置文件,其中包含与HTTP相关的实验性选项,它具有启用选项的选项:

代码语言:javascript
复制
tls_server_config:
  # Certificate and key files for server to use to authenticate to client.
  cert_file: <filename>
  key_file: <filename>

  # Server policy for client authentication. Maps to ClientAuth Policies.
  # For more detail on clientAuth options:
  # https://golang.org/pkg/crypto/tls/#ClientAuthType
  #
  # NOTE: If you want to enable client authentication, you need to use
  # RequireAndVerifyClientCert. Other values are insecure.
  client_auth_type: RequireAndVerifyClientCert # default = "NoClientCert"

  # CA certificate for client certificate authentication to the server.
  client_ca_file: <filename>

该文件的文档位于HTTPS和身份验证文章中。注意,在创建这个文件之后,您必须使用额外的选项启动Prometheus:

代码语言:javascript
复制
--web.config.file=/path/to/the/file.yml

上述装置将配置在接收部件上。发送部分需要在其remote_write中配置的客户端TLS证书。

代码语言:javascript
复制
remote_write:
- url: https://prometheus.example.com
  tls_config:
    # https://prometheus.io/docs/prometheus/latest/configuration/configuration/#tls_config
    cert_file: <filename>
    key_file: <filename>
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/71244535

复制
相关文章

相似问题

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