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

inputs/mongodb not parsing configs #2888

Closed
Jaff opened this issue Jun 5, 2017 · 8 comments
Closed

inputs/mongodb not parsing configs #2888

Jaff opened this issue Jun 5, 2017 · 8 comments
Assignees
Labels
bug unexpected problem or unintended behavior regression something that used to work, but is now broken
Milestone

Comments

@Jaff
Copy link

Jaff commented Jun 5, 2017

Bug report

Up to 1.2.1 this was working; in 1.3.0 and 1.3.1, getting error reading config.

Relevant telegraf.conf:

See https://gist.github.com/Jaff/3a2024afaf44b9b5a448090f46a94fc8

System info:

telegraf 1.3.0, 1.3.1 on Ubuntu 14.04.4 (x86_64)
[Include Telegraf version, operating system name, and other relevant details]

Steps to reproduce:

  1. /etc/telegraf/telegraf.conf contains same data as we used in 1.2.1 version
  2. /etc/telegraf/telegraf.d/monitor_mongodb.conf as used in 1.2.1 version

Expected behavior:

telegraf will collect data from mongodb and output to graphite log

Actual behavior:

telegraf unable to connect to mongodb

Additional info:

logs contain:
2017-06-05T20:56:30Z E! Error in plugin [inputs.mongodb]: Unable to parse to address '127.0.0.1:27017': parse 127.0.0.1:27017: first path segment in URL cannot contain colon

[Include gist of relevant config, logs, etc.]

Feature Request

Opening a feature request kicks off a discussion.

Proposal:

Current behavior:

Desired behavior:

Use case: [Why is this important (helps with prioritizing requests)]

@danielnelson
Copy link
Contributor

Possible workaround is to use the mongodb:// uri scheme.

@danielnelson danielnelson added bug unexpected problem or unintended behavior regression something that used to work, but is now broken labels Jun 5, 2017
@danielnelson danielnelson added this to the 1.3.2 milestone Jun 5, 2017
@Jaff
Copy link
Author

Jaff commented Jun 5, 2017

Seems to be working OK using mongodb:// uri now with 1.3.0

@Jaff
Copy link
Author

Jaff commented Jun 5, 2017

And likewise with 1.3.1

@Jaff Jaff closed this as completed Jun 5, 2017
@danielnelson
Copy link
Contributor

I'm going to reopen since this should still be fixed.

@danielnelson danielnelson reopened this Jun 5, 2017
@danielnelson
Copy link
Contributor

This appears to be caused by a change in go 1.8: golang/go#19297. They are not going to fix it since it was originally a bug and so I'll just change our default urls.

@danielnelson
Copy link
Contributor

Same bug in the leofs plugin

@jackzampolin
Copy link
Contributor

Should we fix this with documentation and reference the issue?

@danielnelson
Copy link
Contributor

I did a combination of documentation and code. The old method should still work for now but it prompts you to use a url with scheme. For mongodb use mongodb://127.0.0.1:27017 and for leofs use udp://127.0.0.1:4020.

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 regression something that used to work, but is now broken
Projects
None yet
Development

No branches or pull requests

4 participants