-
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
Add support for basic auth in couchdb input #5160
Conversation
@fungiboletus I added support for basic auth to the couchdb plugin, but have not tested it on a real server. Do you think you would be able to test it out with one of these builds? (let me know if your build is not listed here) |
@@ -80,7 +80,9 @@ type ( | |||
} | |||
|
|||
CouchDB struct { | |||
Hosts []string `toml:"hosts"` | |||
Hosts []string `toml:"hosts"` | |||
BasicUsername string `toml:"basic_username"` |
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.
I probably would have just called it Username/Password to stay uniform with other plugins (elasticsearch, kibana, icinga2, rabbitmq, etc...)
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.
I was on the fence about this but decided to be more explicit because CouchDB supports several authentication methods. We have a number plugins using this naming as well and I could go either way.
I would probably never consider implementing the cookie method, but the proxy method is a possibility. I guess if we added it we could provide another option auth_method
? Which way do you think is best?
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.
Sound logic. I say leave it, as you said, there are other plugins that use the basic_
prefix.
@danielnelson Thanks, that was fast. I tested it and it worked as expected. |
I am getting this error:
The configuration I am using is for couchdb2
|
@nbari What version of Telegraf do you have, it will need to be 1.10.0. |
I am using 1.9.3, will try updating to 1.10.0 |
closes: #5155
Required for all PRs: