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

MongoDB without SSL #2209

Closed
gallart opened this issue Dec 29, 2016 · 1 comment · Fixed by #2235
Closed

MongoDB without SSL #2209

gallart opened this issue Dec 29, 2016 · 1 comment · Fixed by #2235
Labels
bug unexpected problem or unintended behavior
Milestone

Comments

@gallart
Copy link

gallart commented Dec 29, 2016

Bug report

Mongodb telegraf input seems to require SSL. Could not find any documentation on how to disable SSL.

Relevant telegraf.conf:

# MONGO
[[inputs.mongodb]]
  servers = ["mongodb://login:password@127.0.0.1:27017"]
  gather_perdb_stats = false

System info:

  • Gentoo Linux
  • Telegraf 1.1.2
  • Mongo 2.6.12

Steps to reproduce:

  1. ./telegraf -config telegraf.conf -test -input-filter mongodb

Expected behavior:

Result of mongodb stats.

Actual behavior:

error dialing over ssl, server returned error on SASL authentication step: Authentication failed.
2016/12/29 14:40:22 Errors encountered: [Unable to connect to MongoDB, server returned error on SASL authentication step: Authentication failed.

Thanks,

Gaëtan

@sparrc
Copy link
Contributor

sparrc commented Jan 6, 2017

your connection is failing because the user/password is wrong, it is not actually using SSL, the log message is simply wrong.

Fix for this is to delete the fmt.Printf here: https://github.com/influxdata/telegraf/blob/master/plugins/inputs/mongodb/mongodb.go#L131-L133

@sparrc sparrc added this to the 1.2.0 milestone Jan 6, 2017
@sparrc sparrc added the bug unexpected problem or unintended behavior label Jan 6, 2017
njwhite pushed a commit to njwhite/telegraf that referenced this issue Jan 31, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants