Skip to content
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

中间件实例指标采集异常 #1112

Open
ttbug opened this issue Dec 18, 2024 · 4 comments
Open

中间件实例指标采集异常 #1112

ttbug opened this issue Dec 18, 2024 · 4 comments

Comments

@ttbug
Copy link
Contributor

ttbug commented Dec 18, 2024

Relevant config.toml

任意中间件配置均可

Logs from categraf

2024/12/17 18:14:15 metrics_agent.go:307: E! failed to init input: http.mongodb error: could not instantiate mongodb lag exporter: cannot connect to mongo: cannot connect to MongoDB: server selection error: server selection timeout, current topology: { Type: Single, Servers: [{ Addr: 127.0.0.1:20040, Type: Unknown, Last error: connection() error occurred during connection handshake: dial tcp 127.0.0.1:20040: connect: connection refused }, ] }

System info

categraf 0.3.83, ubuntu 16.04

Docker

No response

Steps to reproduce

  1. 停掉任意一个中间件实例
  2. 重启categraf,此时对应的实例不会有指标上报
  3. 启动停掉的实例,此时仍然没有对应的指标上报

Expected behavior

期望此时指标会正常上报

Actual behavior

实际上启动的实例指标并没有上报

Additional info

从代码来看,由于categraf启动时,对应的实例由于没有启动,因此没有被初始化。后续好像也没有再去尝试对这个实例做初始化,导致对应的实例指标一直没有上报,是不是需要在这里去尝试对没有正常初始化的实例做重试,或者有其它更好的解决办法
企业微信截图_17345044384209

@kongfei605
Copy link
Collaborator

不信

@ttbug
Copy link
Contributor Author

ttbug commented Dec 18, 2024

不信

测试了多次,都出现了,而且从代码来看,初始化失败后,后续确实没有尝试重试初始化

@kongfei605
Copy link
Collaborator

你是测试了mongodb吧?

@ttbug
Copy link
Contributor Author

ttbug commented Dec 24, 2024

你是测试了mongodb吧?

对,但是看代码这里看是个通用的逻辑,不同的中间件表现还不一样吗

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants