Prometheus监控之使用nginxBasic认证

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Prometheus监控之使用nginxBasic认证相关的知识,希望对你有一定的参考价值。

mkdir -p /etc/nginx
htpasswd -c /etc/nginx/.htpasswd admin

http
server
listen 12321;

location /prometheus
auth_basic "Prometheus";
auth_basic_user_file /etc/nginx/.htpasswd;

proxy_pass http://localhost:9090/;




实际访问地址:http://localhost:12321/prometheus/metrics

以上是关于Prometheus监控之使用nginxBasic认证的主要内容,如果未能解决你的问题,请参考以下文章

云原生之Docker实战使用Docker部署Prometheus 服务监控系统

prometheus监控之Mysql监控

云原生系列之使用prometheus监控nginx

性能监控之 Golang 应用接入 Prometheus 监控

性能监控之 Golang 应用接入 Prometheus 监控

监控利器之Prometheus服务监控-上篇