当前位置:网站首页>Prometheus remote_write InfluxDB,unable to parse authentication credentials,authorization failed

Prometheus remote_write InfluxDB,unable to parse authentication credentials,authorization failed

2022-07-07 18:13:00 leboop-L

这里Prometheus是通过如下方式启动的:

systemctl start prometheus.service

执行如下命令,查看Prometheus日志:

journalctl -u prometheus -f
 

错误:unable to parse authentication credentials,authorization failed

查看Prometheus配置文件prometheus.yml,如下:

remote_write:
  - url: "http://bigdata111:8086/api/v1/prom/write?db=combeye&u=combeye&p=#Wtt2&Me"

如果不仔细研究,无法看出问题,后来发现,是因为密码中包含了url的特殊字符,例如这里#和&,需要使用编码代替,#对应编码%23,$对应编码%26,修改为如下:

remote_write:
  - url: "http://bigdata111:8086/api/v1/prom/write?db=combeye&u=combeye&p=%23Wtt2%26Me"

成功!


 

原网站

版权声明
本文为[leboop-L]所创,转载请带上原文链接,感谢
https://blog.csdn.net/L_15156024189/article/details/125633559