Prometheus安全认证
Prometheus安全认证
背景
一般Prometheus开启端口之后就可以访问UI,缺少安全认证
Prometheus提供了 Basic Auth能力
- Ref:https://prometheus.ac.cn/docs/prometheus/latest/configuration/https/
- /web-config.yml:https://github.com/prometheus/prometheus/blob/release-3.4/documentation/examples/web-config.yml
1. 设置账号密码
Centos |
2.配置web-config.yml
basic_auth_users: |
3. 启动配置添加
/bin/prometheus --web.config.file web-config.yml
4. 检查
访问Promeheus UI需要登陆才能访问
Ref
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 Joohwan!
评论