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

Collecting the mongodb cluster is abnormal #10461

Closed
zhmingyong opened this issue Jan 19, 2022 · 1 comment
Closed

Collecting the mongodb cluster is abnormal #10461

zhmingyong opened this issue Jan 19, 2022 · 1 comment
Labels
area/mongodb bug unexpected problem or unintended behavior

Comments

@zhmingyong
Copy link

zhmingyong commented Jan 19, 2022

Relevent telegraf.conf

[[inputs.mongodb]]
   servers = ["mongodb://a_tc_zdhyw_test:[email protected]:27010"]

Logs from Telegraf

telegraf | 2022-01-19T07:33:22Z E! [telegraf] Error running agent: could not initialize input inputs.mongodb: unable to connect to MongoDB: server selection error: context deadline exceeded, current topology: { Type: Unknown, Servers: [{ Addr: 172.23.3.61:27010, Type: Unknown }, ] }

System info

Telegraf 1.20.4, CentOS7 2009, Docker version 19.03.15, build 99e3ed8, MongoDB 4.4.4

Docker

Docker version 19.03.15, build 99e3ed8

Steps to reproduce

1.Add a dedicated conf for MongoDB like the one above (to simulate a failed conn, just change the port number, for example)
2.Restart Telegraf “docker-compose down && docker-compose up”

Expected behavior

At least a log message to STDERR, on init, about a failing conn to a MongoDB server (with no retry mechanism)

Actual behavior

telegraf | 2022-01-19T07:33:22Z E! [telegraf] Error running agent: could not initialize input inputs.mongodb: unable to connect to MongoDB: server selection error: context deadline exceeded, current topology: { Type: Unknown, Servers: [{ Addr: 172.23.3.61:27010, Type: Unknown }, ] }

Additional info

No response

@zhmingyong zhmingyong added the bug unexpected problem or unintended behavior label Jan 19, 2022
@powersj
Copy link
Contributor

powersj commented Jan 19, 2022

I believe this is a dup of #10078, if not please feel free to provide more details as to what you are after.

Thanks!

@powersj powersj closed this as completed Jan 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/mongodb bug unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

2 participants