-
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
prometheus input: Remove credentials from URL before setting url tag #3743
Conversation
…ercase to not overwrite net/url package, run gofmt
circleci test fail of TestTailBadLine has nothing to do with this pull request. On my local system the failed test runs through. Any ideas? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry about the test, I'll take a look at it.
plugins/inputs/prometheus/README.md
Outdated
@@ -67,7 +67,7 @@ Measurement names are based on the Metric Family and tags are created for each | |||
label. The value is added to a field named based on the metric type. | |||
|
|||
All metrics receive the `url` tag indicating the related URL specified in the | |||
Telegraf configuration. If using Kubernetes service discovery the `address` | |||
Telegraf configuration. Existing username and password for basic authentication will be removed before. If using Kubernetes service discovery the `address` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's remove this, we shouldn't have to say this because doing it the other way would be bad. BTW, using the userinfo section of the url is not basic auth.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh sorry, you are right, this is not basic auth! I red it in the referenced issue and wasn't think about it when writing the commit message and Readme.
I'll remove the sentence in Readme.md with next commit.
I don't know what you have done but it fixed the failing test TestTailBadLine. :) |
(cherry picked from commit b7a68ee)
* master: (59 commits) Added additional SQL Server performance counters (influxdata#3770) Update changelog Fix ping plugin not reporting zero durations (influxdata#3778) Adjust time of nightly build Update changelog Add TLS support to the mesos input plugin (influxdata#3769) Install new requirements for fpm gem install Update changelog Add additional metrics and reverse metric names option to openldap (influxdata#3722) Update paho mqtt to latest release Update changelog Remove userinfo from url tag in prometheus input (influxdata#3743) Update sample config in contributing docs Run nightly build sequentially Fix Makefile on Windows and use in AppVeyor build (influxdata#3748) Fix example source_override values in wavefront output (influxdata#3744) Update gitignore Update changelog Improve procstat readme Add native Go method for finding pids to procstat (influxdata#3559) ...
Remove user data from URL before setting URL tag to prevent information disclosure.
See #3739.
Also run gofmt and turn variables with name url to uppercase to prevent overwrite of net/url package. Now it is more clear wheter the variable or package is used.
Required for all PRs: