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.leofs: Fix related to Go 1.8 url.Parse breaks the plugin #3321

Closed
windkit opened this issue Oct 11, 2017 · 6 comments
Closed

inputs.leofs: Fix related to Go 1.8 url.Parse breaks the plugin #3321

windkit opened this issue Oct 11, 2017 · 6 comments
Labels
bug unexpected problem or unintended behavior regression something that used to work, but is now broken
Milestone

Comments

@windkit
Copy link
Contributor

windkit commented Oct 11, 2017

Bug report

Relevant telegraf.conf:

[[inputs.leofs]]
  servers = ["udp://192.168.100.35:4000"]

System info:

From 1.4.0
Related PR: #2900

snmpwalk does not accept endpoint with scheme udp:// so the plugin would fail to collect statistics

Expected behavior:

$ snmpwalk -v2c -cpublic udp:192.168.100.35:4000 .1.3.6.1.4.1.35450
iso.3.6.1.4.1.35450.34.1.0 = STRING: "G0@192.168.100.35"
iso.3.6.1.4.1.35450.34.2.0 = Gauge32: 538
iso.3.6.1.4.1.35450.34.3.0 = Gauge32: 72424809
iso.3.6.1.4.1.35450.34.4.0 = Gauge32: 51886439
iso.3.6.1.4.1.35450.34.5.0 = Gauge32: 20537891
iso.3.6.1.4.1.35450.34.6.0 = Gauge32: 6355767
iso.3.6.1.4.1.35450.34.7.0 = Gauge32: 538
iso.3.6.1.4.1.35450.34.8.0 = Gauge32: 72504578
iso.3.6.1.4.1.35450.34.9.0 = Gauge32: 51881218
iso.3.6.1.4.1.35450.34.10.0 = Gauge32: 20609542
iso.3.6.1.4.1.35450.34.11.0 = Gauge32: 6356338
iso.3.6.1.4.1.35450.34.12.0 = Gauge32: 0
iso.3.6.1.4.1.35450.34.13.0 = Gauge32: 0
iso.3.6.1.4.1.35450.34.14.0 = Gauge32: 0
iso.3.6.1.4.1.35450.34.15.0 = Gauge32: 0
iso.3.6.1.4.1.35450.34.16.0 = Gauge32: 0
iso.3.6.1.4.1.35450.34.17.0 = Gauge32: 0
iso.3.6.1.4.1.35450.34.18.0 = Gauge32: 0
iso.3.6.1.4.1.35450.34.19.0 = Gauge32: 0
iso.3.6.1.4.1.35450.34.20.0 = Gauge32: 0
iso.3.6.1.4.1.35450.34.21.0 = Gauge32: 0
iso.3.6.1.4.1.35450.34.31.0 = Gauge32: 63
iso.3.6.1.4.1.35450.34.32.0 = Gauge32: 114881776
iso.3.6.1.4.1.35450.34.33.0 = Gauge32: 63
iso.3.6.1.4.1.35450.34.34.0 = Gauge32: 114106949

Actual behavior:

$ snmpwalk -v2c -cpublic udp://192.168.100.35:4000 .1.3.6.1.4.1.35450
getaddrinfo: //192.168.100.35 Name or service not known
snmpwalk: Unknown host (udp://192.168.100.35:4000)

Additional info:

Related to Issue at LeoFS leo-project/leofs#869

@danielnelson danielnelson added this to the 1.4.3 milestone Oct 11, 2017
@danielnelson danielnelson added bug unexpected problem or unintended behavior regression something that used to work, but is now broken labels Oct 11, 2017
@danielnelson
Copy link
Contributor

Thanks for the report, should be able to fix by the next patch release.

@phemmer
Copy link
Contributor

phemmer commented Oct 11, 2017

This never worked. The plugin doesn't support URLs. It accepts host:port.

@danielnelson
Copy link
Contributor

It used to work because previously you could url.Parse(host:port). I should have fixed it by removing the url.Parse.

@phemmer
Copy link
Contributor

phemmer commented Oct 11, 2017

Oh, nevermind me. I'm totally off my rocker. I misread the issue. Carry on :-)

@windkit
Copy link
Contributor Author

windkit commented Oct 12, 2017

PR at #3328

@danielnelson
Copy link
Contributor

Thanks @windkit, will be in 1.4.3

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

3 participants