-
Notifications
You must be signed in to change notification settings - Fork 261
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
添加mongo采集后一直报错 #1074
Comments
执行 返回
看了一下发的连接,说明servers = ["mongodb://user:pass@mongodb://127.0.0.1:27017/?authSource=admin"]是最新配置 原来的配置是
换成 是最新版 不能用 mongodb_uri 和username password么? |
说错了,换成上面的配置就不采集了 |
能用。 username 和 password单独配置 也是去拼接server字符串 |
=> mongdb:// 重复了,写了两次。 |
更改配置成 mongodb://categraf:[email protected]:3000/?authSource=admin
添加超级权限后 错误变成两个
查阅资料,发现这块 |
mongodb用的什么版本? |
mongo:5.0.0 |
我用mongdb5.0.26+categraf v0.3.80 测试,配置
和
都没问题呢 |
这个warning不是说 没有document么? 有数据的DB中日志报什么错呢? |
Relevant config.toml
Logs from categraf
System info
categraf v0.3.80,docker 26.1.2,ubuntu 22.04
Docker
Client: Docker Engine - Community
Version: 26.1.2
API version: 1.45
Go version: go1.21.10
Git commit: 211e74b
Built: Wed May 8 13:59:59 2024
OS/Arch: linux/amd64
Context: default
Steps to reproduce
1.categraf添加mongo连接信息
2.systemctl restart categraf 重启
3.systemctl status categraf 查看日志
4.发现一直报错,就算换成mongo的root用户还是报错
Expected behavior
拥有root权限的用户,采集应该不会报错。
Actual behavior
一直提示报错
level=warning msg="cannot create metrics for oplog: mongo: no documents in result
level=error msg="cannot get $collstats cursor for collection rider2.system.profile: (Unauthorized) not authorized on rider2 to execute command
Additional info
No response
The text was updated successfully, but these errors were encountered: