当前位置:网站首页>prometheus-federation-tls加密
prometheus-federation-tls加密
2022-07-30 05:49:00 【大新新大浩浩】
prometheus-federation-tls加密
前言
记录prometheus-federation-tls可靠的联邦加密传输模式。
一、federation为什么要使用tls加密?
单纯的federation只是满足了功能的使用,却没有考虑到安全性的建立,只使用basic_auth在内网环境上还好,但是放在公网上安全级别还是不足,所以使用tls加密,提高安全等级。
二、配置步骤
2.1 启动第二级的prometheus
参考系列文章中的《prometheus-basic_auth加密》、《prometheus-tls加密》,将二级prometheus设置开启tls加密
2.2 启动第一级的prometheus
新增二级prometheus相关配置
- job_name: "prometheus-federate-xxxxxx-xxxxx"
scrape_interval: 10s
scheme: https
tls_config:
ca_file: prom-test.crt #二级prometheus的crt文件,默认路径/etc/prometheus
insecure_skip_verify: true # 跳过不安全认证
honor_labels: true
metrics_path: '/federate'
params:
'match[]':
- '{job="prometheus"}'
- '{__name__=~"job.*"}'
- '{__name__=~"node.*"}'
static_configs:
- targets:
- 'xxx.xx.xx.x:9090'
使用docker容器启动服务时,需要将prom-test.crt文件映射到容器内
-v /xxx/xxx/prom-test.crt:/etc/prometheus/prom-test.crt
三、检查结果
检查一级prometheus的targets信息,查看是否收集成功

收集成功,配置OK
总结
边栏推荐
猜你喜欢
随机推荐
IO进程线程->标准IO->day1
如何使用xilinx的FFT ip
05-Theos
Jenkins一些常见问题
libgrape-lite on GPUs:GPU助力加速图分析任务
测试第一题
二、1稀疏sparsearray数组
05-Theos
网络协议03 - 路由和NAT
Biotin-NHS LC(72040-63-2)生物素接头|站点特定探针
读取GZ包的内容代码
事件传递和响应者链条
GadgetInspector principle analysis
一种分布式深度学习编程新范式:Global Tensor
MongoDB-CUD没有R
libgrape-lite: 提供 GraphScope 的图分析能力
测开基础知识01
Build an intelligent network security management and control system for digital government
mysql常用命令以及mysqldump备份
Rapidly develop GraphScope graph analysis applications









