-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
OpenTSDB output plugin broken when host is given without scheme #2299
Comments
On the larger scope of the issue, it would be really nice if telegraf were consistent in its naming of such parameters. Right now it's all over the place. Some parameters are called "url" and take a host, some parameters are called "host" and take a url. Others are called "address" and take a url, or host, etc. |
@phemmer that would be better, but would also be a breaking change at this point :( |
Also, the error message is not really helpful. Maybe the error returned from DialTCP can be returned instead of that generic error message? |
I will add the error message in as well |
In this code line, url.Parse is used to parse the given
host
string. If this string does not contain a scheme (e.g.google.com
instead oftcp://google.com
),u.Host
is an empty string and the connect fails.Bug report
Relevant telegraf.conf:
System info:
Steps to reproduce:
Provide a host without a scheme to the OpenTSDB output plugin.
Expected behavior:
The plugin should be able connect to the host.
Actual behavior:
The connection fails with:
Failed to connect to output opentsdb, retrying in 15s, error was 'OpenTSDB: Telnet connect fail'
The text was updated successfully, but these errors were encountered: