美文网首页
监控页面添加认证信息

监控页面添加认证信息

作者: Al_不期而遇 | 来源:发表于2022-03-04 23:00 被阅读0次

node 开启认证

yum install httpd-tools -y

htpasswd -nBC 12 ''|tr -d ':\n'

#修改node的配置文件

vim /usr/local/node_exporter/config.yml

basic_auth_users:

prometheus: $2y$12$P5Hp1sXYFkAgedcO7jyFLeLKmj4Fgv36rirX/ewxLEH6KttIIl/jq

启动使用认证方式

/usr/local/node_exporter/node_exporter --web.config=/usr/local/node_exporter/config.yml

prometheus server开启配置

- job_name: 'webserver'

basic_auth:

username: prometheus

password: 123456

scheme: http

metrics_path: /metrics

static_configs:

- targets: ['192.168.1.106:9100','192.168.1.107:9100']

验证是否开启认证

相关文章

网友评论

      本文标题:监控页面添加认证信息

      本文链接:https://www.haomeiwen.com/subject/yhhvrrtx.html