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

17 篇文章 14 订阅 ¥9.90 ¥99.00
本文介绍了在使用Prometheus进行remote_write到InfluxDB时遇到的'unable to parse authentication credentials'和'authorization failed'错误。问题根源在于密码中包含URL特殊字符如#和&,需要进行URL编码,将#替换为%23,&替换为%26。修复此问题后,配置成功。
摘要由CSDN通过智能技术生成

这里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"

成功!


 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

ErbaoLiu

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值