首页 > 系统相关 >Prometheus监控之使用nginxBasic认证

Prometheus监控之使用nginxBasic认证

时间:2022-11-25 10:03:15浏览次数:67  
标签:nginxBasic auth 认证 etc Prometheus basic http localhost

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

标签:nginxBasic,auth,认证,etc,Prometheus,basic,http,localhost
From: https://blog.51cto.com/u_13236892/5885578

相关文章